php object in memory
Posted: Fri Sep 16, 2011 1:38 pm
Hi all,
I am new to this form, and to php. I am creating an app that will have lots of frequent (but small) requests coming into the server. I would like to keep some of the data in memory on the server so I do not need to constantly thrash the database.
In java this was pretty easy. I would just create a singleton static object that is shared among any given jsp/servlet. I would put data in that object which needs to be updated and accessed frequently.
I am new to php, but I have not found a straightforward way to do this. Any ideas?
Thanks,
-Adam
I am new to this form, and to php. I am creating an app that will have lots of frequent (but small) requests coming into the server. I would like to keep some of the data in memory on the server so I do not need to constantly thrash the database.
In java this was pretty easy. I would just create a singleton static object that is shared among any given jsp/servlet. I would put data in that object which needs to be updated and accessed frequently.
I am new to php, but I have not found a straightforward way to do this. Any ideas?
Thanks,
-Adam