I generally extract most of my queries out into their own files and
cfinclude them where/as needed (yes, I confess, I use a variation of
Fusebox). After updating data I simply recall the query setting the cache
time to zero. Maybe this snippet will help confuse you further.  :)

<!--- DO MY UPDATE--->
<CFQUERY name="myUpdateQuery"  DATASOURCE="#request.AppDSN#" dbtype="ODBC">
    UPDATE  Whatever
    SET  Whatever.....
</CFQUERY>

<!--- RESET MY QUERY CACHE TIME--->
 <CFSET request.QueryCacheTime="#CreateTimeSpan(0,0,0,0)#">

<!--- AND THEN CFINCLUDE MY ORIGINAL QUERY FILE TO FLUSH THE CACHE--->
<CFQUERY NAME="myQuery" DATASOURCE="#request.AppDSN#" dbtype="ODBC"
cachedwithin="#request.QueryCacheTime#">
    SELECT      Whatever
    FROM         Wherever
</CFQUERY>

Ken


----- Original Message -----
From: "Bud" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, November 24, 2000 3:36 PM
Subject: RE: Caching Queries......


> On 11/24/00, Dave Watts penned:
> >You can update cached queries by rerunning the query with a CACHEDWITHIN
or
> >CACHEDAFTER attribute which would cause the query to expire immediately
from
> >the cache, then rerunning the query again with the desired cache time
> >length.
>
> I set my shopping cart with this in application.cfm:
>
> <CFPARAM NAME="attributes.cachequery"
DEFAULT="#createtimespan(0,0,30,0)#">
>
> Then add cachedwithin="#attributes.cachequery#" to the queries I want to
cache.
>
> Then when I do changes that are imperative they be updated, I set the
> value to 0,0,0,0 and wait a half hour and set it back.
> --
>
> Bud Schneehagen - Tropical Web Creations
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> ColdFusion Solutions / eCommerce Development
> [EMAIL PROTECTED]
> http://www.twcreations.com/
> 954.721.3452
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
>
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to