Dave Watts penned: >Since what you really want to do is lock the entire Session scope (which is >why the SCOPE attribute was added to subsequent releases, I guess), you >might just want to use the CFID and CFTOKEN variables, without the >"_setuser" suffix.
OK. >However, why do you have Client and Session variables both enabled? You >might be better off just using one or the other, since they both essentially >do the same sort of thing. Well, with my shopping cart, I use client variables for all basic variables like user ids, totals, etc. that don't take up alot of space. I allow the merchant to choose whether to use session or client for the actual shopping cart items. I originally moved everything over to client variables when the cflocking fiasco first reared it's ugly head, but I soon found that if the app is on a host that forces you to use either the registry or cookies (Intermedia comes to mind. Unless they changed their policy in the past year or so.), there is too much data for either. So we can use session variables for the cart contents. However if they WANT to use client variables exclusively, in a clustered environment or allowing the cart to keep it's contents on a CF restart, they can. S. Isaac Dealey penned: >You might want to use #cookie.cfid# and #cookie.cftoken# -- you might see a >small performance improvement over using client.cfid and client.cftoken >since the CF Server needs to address the cookie variables, then connect to >the client variable storage location in order to get to the client variables >( for the first reference to them on a page). > ><cflock type="exclusive" name="#cookie.cfid#_#cookie.cftoken#" >timeout="..."> > >or possibly > ><cflock type="exclusive" name="#cookie.cfmagic#" timeout="..."> My cart works with and without cookies so in this case, there won't always be a cookie. >Although I'm not certain off the top of my head if the cfmagic variable is >set in a cookie or available on 4.01. It also uses a colon to delimit the >cfid and cftoken pair, which I don't think will cause any problems for the ><cflock> tag, but it's something to bear in mind. > >I'd also concur with Dave that as a rule of thumb, you might want to just >use session or client variables rather than a mix, although they do both >have different advantages. > >Afaik you can't store complex variables ( structures, queries, arrays(?) ) >in client variables, whereas you can in session variables. Session varaibles >have the advantage of being able to store complex data types, but require >locking prior to MX. I store the shopping cart by converting with WDDX when using client variables. Works well, but like I said, it is too big for cookies and fills up the registry pretty quickly, so unless the merchant is running in a clustered environment and has a good client storage database available I suggest they use session for the cart portion. :) -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

