That's correct.
I create a structure with various timeouts and a URL switch
(...&reset=1) that makes them all 0. For example:
<cfscript>
settings = StuctNew();
if (isdefined("url.reset"){
settings.daytimeout = 0;
settings.sixhourstimeout = 0;
settings.onehourtimeout = 0;
settings.thirtymintimeout = 0;
}
else {
settings.daytimeout = createtimespan(1,0,0,0);
settings.sixhourstimeout = createtimespan(0,6,0,0);
settings.onehourtimeout = createtimespan(0,1,0,0);
settings.thirtymintimeout = createtimespan(0,0,30,0);
}
</cfscript>
Then just use <cfquery... Cachedwithin="#settings.daytimeout#"> in your
queries.
Easy to reset when you need it.
Cheers
Tom
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Tilbrook
Sent: Saturday, December 04, 2004 2:08 AM
To: [EMAIL PROTECTED]
Subject: RE: Caching Queries
I think so. Use a "zero" timeout for the query. I think.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jake
Sent: Saturday, 4 December 2004 11:55 AM
To: [EMAIL PROTECTED]
Subject: Caching Queries
I have an application that output some data on the front end. I'd like
to cache some of those queries for a long period, since they rarely
update. But at the same time, I have to be able to show updated results
immediately.
Is there a way to cache a query but then kill the cache as soon as
something is added via the admin tool? Is it a simple as simply
rerunning the front end query on the admin side?
Is there another way to do this?
Jake
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm