*EXPLICATIVE* Thanks M
-----Original Message----- From: Raymond Camden [mailto:jedimaster@;macromedia.com] Sent: Monday, November 04, 2002 5:05 PM To: CF-Talk Subject: RE: Query caching Nope - sorry. :) Your isdefined check needs a read lock around it. Quick code that my have typos+pseudo-crap: <cflock scope="session" type="readOnly" timeout=3> <cfif not isDefined("session.temp")> <cfset variables.needInit = 1> </cfif> </cflock> <cfif isDefined("variables.needInit")> exclusive lock here + query </cfif> ======================================================================= Raymond Camden, ColdFusion Jedi Master for Hire Email : [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Haggerty, Mike [mailto:MHaggerty@;mbda.gov] > Sent: Monday, November 04, 2002 4:43 PM > To: CF-Talk > Subject: RE: Query caching > > > Thank you for your comments. > > <cfif NOT isdefined("session.temp")> > <cflock name="data_6" throwontimeout="Yes" timeout="10" > type="EXCLUSIVE"> > <cfif NOT isdefined("session.temp")> > <CFQUERY NAME="senate" DATASOURCE="resource"> > SELECT lastname, firstname, party, state, > website, email > FROM senators > WHERE state = '#session.state#' > </CFQUERY> > <cfset session.temp = senate> > </cfif> > </cflock> > </cfif> > > <CFOUTPUT>#session.temp.recordcount#</CFOUTPUT> > > Happy now? > > Hoping I did this right, > M > > -----Original Message----- > From: Raymond Camden [mailto:jedimaster@;macromedia.com] > Sent: Monday, November 04, 2002 4:33 PM > To: CF-Talk > Subject: RE: Query caching > > > This example is missing locking. Sorry if I sound like a > broken record - > but you _must_ remember to use locking. Also, you don't need cfoutputs > in cfquery tags - CF vars are automatically processed. > > ============================================================== > ========= > Raymond Camden, ColdFusion Jedi Master for Hire > > Email : [EMAIL PROTECTED] > WWW : www.camdenfamily.com/morpheus > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

