Caching a PHP Array

前端 未结 3 980
轻奢々
轻奢々 2020-12-30 07:01

My problem is im creating a large nested PHP array which is parsing information from multiple external sources.

On the first return I would like to cache this data.

3条回答
  •  攒了一身酷
    2020-12-30 07:43

    have you thought about putting static $yourData = array(); in your method where you download the data then test whether theres any data in this static array and use that, overwise get the data? hope this helps in some way :D

提交回复
热议问题