If the data rarely changes and you are using the recordset basically as a
lookup, go ahead and put into an application variable. Be sure to build in a
mechanism to refresh the application variables either manually or
automatically. If the data does change, you want to be able refresh your
application variables.

---
Jeffrey B. Marsh
Professionals built the Titanic.
Amateurs built the Ark.

-----Original Message-----
From: josian [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 3:46 AM
To: Fusebox
Subject: cached query v/s app variable

Hi all

I have a pb to cache a query or put it in an application variable(for a
query which rarely changes).
So what is the best choice?
Does CF Server treat the two in the same way or store them differently?
Below is a piece of my code...


Cached query...

<CFQUERY NAME="myquery" DATASOURCE="data"
cachedwithin="#createtimespan(365)#>
SELECT      NAME,PARENT,PATH
FROM         FAMILY
</CFQUERY>


Set query in application variable....

<CFQUERY NAME="application.myquery" DATASOURCE="data">
SELECT      NAME,PARENT,PATH
FROM         FAMILY
</CFQUERY>


Thanks all for your replies.

Josian Chung sin
CF- Developper
Ingecom Mauritius
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to