> One option is to use client vars, but they cannot store complex > vars and changing from session to client scope is a PITA in any > sizeable app. ... here is one trick I have used.
Interesting discussion so far. I'm surprised nobody has brought up what seems to be the obvious solution, at least in my opinion: persist to the database. My personal opinion is that if something is important enough to store as part of a session, it's probably important enough to throw back to the database and store with the user's profile/account in perpetuity. My approach has usually been to store any settings or session data to the database at the point it's set/created and reload it with each page request as part of normal operations. The applications I generally work on are very data-intensive so one additional query to grab user preferences and other session-like data is trivial in the grand scheme of things. This won't work if you're trying to persist complex objects in the session scope, of course, but it's a limitation I can live in my applications. It's a small price to pay knowing that an app can seamlessly scale from one to two to 300 servers without code changes around session management or dealing with special cache servers or clustering systems. In any case, find a solution that works for your needs and run with it. -Justin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348043 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

