Re: CFQUERY - cachedwithin

2003-06-06 Thread E. Keith Dodd
Not sure situation is the same, but I use cachedafterdate for my cached queries. If I've changed data, say on an update page, I include the query template and add a variable update = 1 or like that. In application.cfm, I've set a cachedafterdate variable as today's date (without any time) (or it

RE: CFQUERY - cachedwithin

2003-06-06 Thread Andre Mohamed
Try this: In your application.cfm cfif IsDefined(URL.refreshQueryCache) cfset request.cachetimespan = CreateTimeSpan(0,0,0,0) cfelse cfset request.cachetimespan = CreateTimeSpan(1,0,0,0) /cfif Then... cfquery name=query datasource=dsn cachedwithin=#request.cachetimespan#

RE: CFQUERY - cachedwithin

2003-06-06 Thread Philip Arnold
When you have used cachedwithin in CFQUERY, is it possible to override that before the cachedtime is up? For example, cfif not isdefined(application.recache) cfquery name=query datasource=dsn cachedwithin=#createtimespan(0,1,0,0)# ...BLAH... /cfquery cfelse cfquery

RE: CFQUERY - cachedwithin

2003-06-06 Thread Brad Roberts
If I understand your question, I think the answer is, yes. Here's how I handle this: states_get.cfm (query template) - !--- DEFINE DEFAULT VALUE FOR TIME SPAN --- cfparam name=request.cache_qStates default=#createTimeSpan(1,0,0,0)# cfquery name=qStates