Mischa,
Part 1:
You are trying to prevent the user's shopping cart from expiring by storing it in the database and then retrieve it when they restart their session?

Part 2:
OnSessionEnd takes the session scope as an argument.  Thus unless you pass a scope into the application.cfc methds, you won't be able to manipulate them.  I have not tried this and I am not sure this is possible, but perhaps you can test:

<cffunction name="onSessionEnd" returnType="void" output="false">
<cfargument name="sessionScope" type="struct" required="true">
<cfargument name="clientScope" type="struct" required="false">

<cfset client.foo = "bar">
</cffunction>

Teddy

On 8/29/06, Mischa Uppelschoten ext 10 < [EMAIL PROTECTED]> wrote:
I'm probably missing something. Here is my situation:
CFMX7. I'm using OnSessionEnd in Application.cfc to store a user's shopping cart in a database. Works fine. Currently, after the session times out, only the shopping cart page is able to instantiate a shopping cart in the user's session scope and load the old cart. I would like to change this so that any page has the ability to retrieve the shopping cart, but I'm struggeling with performance considerations; I don't want to do a database lookup on every page request. (I want every page to be able to retrieve a user's cart because I built a shopping cart indicator which is displayed on every page).
I have noticed that you cannot set a client variable in the OnSessionEnd event (the event fails silently after the client.myvar=  line if you do so), this would have been perfect because a simple check for a client var and then to a db lookup or not would have been easy. Obviously you cannot set a cookie var either. Should I not worry about an additional db lookup for every page request, or is there a better way to do this?
Many thanks!
Mischa.



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?falogin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to