简体   繁体   中英

php modifiers & cache concept

Does Php have any modifiers like 'persistent' in java?

My purpose is to store Result sets which are retrieved from Database onto server RAM. When user next time searches for same values, I will not go to Database for retrieval again. Simply, I want to simulate cache on RAM.

I have no clue. Could anyone help me with this?

No. Not really.

You could either cache the results to a file, then load it, or use something like memcached in front of your database to get this behaviour.

Alternatively, you could store data in $_SESSION, but that would of course be per user rather than globally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM