Well, I don't know what kind of "waste of resources" you're talking about
because caching uses RAM whether you use SESSION scope, APPLICATION scope
or cachedwithin. Also the original poster asked specifically about saving
a query specific to a single user session. Saving the query to application
scope makes sense when the same query needs to be available to all users.
But when the query is specific to an individual, you can save it to session
scope.
Also, a limitation of using cachedwithin is that the query may be cached
many times by different users (because the query would be different for
different users and the caching is based on the actual SQL performed.) I
prefer having complete control over what is cached and when, rather than
relying on the server to clean out "old" queries.
Sharon
At 01:20 PM 4/13/2000 -0500, Fred Sanders wrote:
>I agree with Judah plus it would seem a waste of resources, why not the
>Application scope instead? That would make more sense to me. also use the
>cachedwithin="()" setting in the query.
>
>
>Fred T. Sanders
>Galveston Island, TX
>------------------------------
>Having a bad day?
>Imagine this...
>
>You are in total seclusion from that hectic place called "The World".
>The soothing sound of a gentle waterfall fills the air with a cascading
>serenity.
>The water is clear.
>You can easily make out the face of the person you are holding underwater.
>
>Feeling better?
>
>
>----- Original Message -----
>From: "Judah McAuley" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, April 13, 2000 11:25 AM
>Subject: Re: Query Caching
>
>
>> At 11:23 AM 4/13/00 -0400, you wrote:
>> >Yes. You can save the query to SESSION scope.
>> >
>> ><cfif NOT IsDefined("SESSION.QueryName")>
>> > <cflock name="#SESSION.SessionID#" timeout="30">
>> > <cfquery name="SESSION.QueryName" datasource="#dsn#">
>> > SQL STUFF
>> > </cfquery>
>> > </cflock>
>> ></cfif>
>> >
>> >HTH!
>> >Sharon
>>
>> One problem I worry about with this: Session variables are frequently
>> stored in the Registry on NT machines, yes? So if you had a very large
>> query, or quite a few users, you are potentially packing a lot of info
>into
>> the registry. Perhaps unwise.
>>
>> Judah
>>
>> --------------------------------------------------------------------------
>----
>> 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.