what I said doesn't use a DB... all it's doing is pretty much the same as you, although the cookie references the session rather than contain all the wddx data.
----- Original Message ----- From: "Peter Dray" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 26, 2003 11:21 AM Subject: Re: [ cf-dev ] A little advice... > That makes sense but I want the cart data to persist across sessions without using a DB. Is there a way to easily do this or is the DB the only option? > > > From Tomo Smith <[EMAIL PROTECTED]> on 26 Nov 2003: > > > wddx structs in a cookie - big no no - will fail as cookies are limited > > in > > size... > > > > What you want to do (as you are using cookies) is turn session > > management on > > in the cfapplication. Then store you shopping cart in a session > > structure. > > As the top of each page that you need the structure, copy it from the > > session to the request scope (using duplicate() ). Then when you have > > done > > all of your processing simple copy the struct back to the session (using > > duplicate() again). Obviously if you are using anything below cfmx > > you'll > > need to lock your session reads and writes using cflock. > > > > that make sense to you? > > > > HTH > > > > Tom > > > > > > ----- Original Message ----- > > From: "Peter Dray" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, November 26, 2003 11:05 AM > > Subject: [ cf-dev ] A little advice... > > > > > > > I'm doing a simple shopping cart 'thing'. I don't want to store the > > data > > in a db and I do want the data to persist across sessions. > > > What I did was... > > > > > > Each item added to the basket is a structure, as is the basket itself. > > I > > then CFWDDX'd it and bunged it in a cookie. > > > > > > Good? Bad? > > > > > > Advice welcome > > > > > > Pete Dray > > > > > > -- > > > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
