It should be safe since PHP guarantees that every request will be handled by a different thread. $_SESSION and the likes should only be used when you want to process state-ful data across pages.


On Fri, Jul 29, 2011 at 8:37 PM, Thomas White, MD, MS, MA <> wrote:

Since ExpressionManager may be called hundreds of times per page, I'm using LimeExpessionManager.php as a Singleton  (so that I can cache results on a page per user).  Is that safe when there are multiple surveys being run against the same server, or should I be using $_SESSION to do caching?

(I'm used to Java where a Singleton would apply to the whole java virtual machine, so a Singleton' values would spill over to other sessions-  which is not what I want here).


Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
limesurvey-developers mailing list