Name your query in the Session Scope:

<cfquery name="Session.Permissions" datasource="blah">
        select blah
</cfquery>

I would do this in the application.cfm to make sure it's always available,
but make sure it only runs once per session:

<cfif not isDefined("Session.Permissions")>
        <cfquery name="Session.Permissions">
</cfif>

I wouldn't worry about taking a memory hit, unless the query is returning
thousands of records (which would be multiplied by each session) and I would
avoid using WDDX where you can use a plain query (as a WDDX packet requires
serialization/de-serialization)

hope this helps

-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 13, 2000 10:23 AM
To: CFTalk
Subject: Query Caching


Hi All,

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?

TIA,
Duane
Director, Web Technologies
Ektron, Inc.
http://www.ektron.com
5 Northern Blvd, Suite 6
Amherst, NH 03031
Tel: 603-594-0249
Fax: 603-594-0258

----------------------------------------------------------------------------
--
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.

Reply via email to