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.

Daniel.

On Fri, Jul 29, 2011 at 8:37 PM, Thomas White, MD, MS, MA <tw176@columbia.edu> wrote:
All-

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).

/Tom

------------------------------------------------------------------------------
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.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
limesurvey-developers mailing list
limesurvey-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/limesurvey-developers