A little different twist on this thread.
Several people have suggested caching queries using session variables:
<cfquery name="Session.myQuery">
I can see cases where this would be useful, but I wonder if it is a
good practice.
Wouldn't be better to use the more general "CachedWithin or
CachedAfter" parameters on the Query statement?
It is my understanding that CF performs some magic with this format,
and can efficiently cache queries for multiple users... actually, the
entire system.
By doing session caching, don't we run the risk of optimizing one
user at the expense of the rest of the system?
TIA
Dick
At 6:39 AM -0400 4/14/2000, [EMAIL PROTECTED] wrote:
>Emily-
>
>It's quite possible to declare a query directly into any of the scope's
>available to your application except Client (unless of course you serialize
>the query w/ wddx.) This is a valid call:
>
><cfquery name="Session.myQuery">
>
>Resulting in Session.myQuery being cached for the duration of the session.
>
>-----Original Message-----
>From: Emily B. Kim [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, April 13, 2000 12:05 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Query Caching
>
>
>>Is it possible to cache a query only for a particular user for only the
>>length of his or her session?
>>I have a query that generates a roles & privileges packet that applies only
>>to the current session and user. When the session expires so does the
>cached
>>query.
>>What the memory load differences vs. storing a session variable with a WDDX
>>packet in it?
>
>you would have to write the query to an array and then store it in a
>session variable. but you could also write the query results to a wddx
>packet and write that to a session variable. i don't know that there would
>be more overhead one way or another...? -emily
>----------------------------------------------------------------------------
>--
>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_tal
>k 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.