You can save queries to SESSION, APPLICATION, SERVER etc. variables. If you
aren't clear on scoping variables, there is a whole section on it in the
CFDocs.
<cfif NOT IsDefined("SESSION.myQuery")>
<cflock name="#SESSION.SessionID#" timeout="10">
<cfquery name="SESSION.myQuery" datasource="#dsn#">
SQL STUFF
</cfquery>
</cflock>
</cfif>
HTH!
Sharon
At 04:36 PM 4/6/2000 -0400, Bill Killillay wrote:
>What do you mean by scoped to a session variable?
>
>> -----Original Message-----
>> From: Pecora, James [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, April 06, 2000 2:53 PM
>> To: '[EMAIL PROTECTED]'
>> Subject: RE: Cached Query's?
>>
>>
>> As long as it's the same syntax and you don't have it scoped to a session
>> var..
>> It gets hit ONCE..then cached...
>>
>> -----Original Message-----
>> From: Bill Killillay [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, April 06, 2000 1:26 PM
>> To: Cf-Talk
>> Subject: Cached Query's?
>>
>>
>> If I cache a query, does that mean that on the server that same query gets
>> cached for every user that hits the site, or is it cached once when the
>> first user hits. Which is better, to cache it or not.
>>
>> Bill Killillay
>> ICQ @ 8425781
>>
>> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
>> "An investment in Knowledge always pays the best interest."
>> -Benjamin Franklin-
>> *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
>>
>> Get Paid to Surf the Web. It's free, easy and fun.
>> Sign up for AllAdvantage.com at
>>
>> http://alladvantage.com/go.asp?refid=FIB-034
>>
>> Most of us are on it every day all day anyway, why not give
>> yourself a pay raise for 25 hours a month.
>>
>> ------------------------------------------------------------------
>> ----------
>> --
>> Archives: http://www.eGroups.com/list/cf-talk
>> To Unsubscribe visit
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>> the body.
>> ------------------------------------------------------------------
>> ------------
>> Archives: http://www.eGroups.com/list/cf-talk
>> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.