I've found in the past that is one of the (if not the only...) good arguments for the use of application variables. Have an application variable defaulted to 30 minutes or so, then put code in application.cfm that looks for "url.setCacheTime" or something like that.
<cfparam name="application.cacheTime" default="#createTimeSpan(0,0,30,0)#"> <cfif isdefined("url.setCacheTime")> <cflock...> <cfset application.cacheTime = createTimeSpan(0,0,url.setCacheTime,0)> </cflock> </cfif> Then just make sure all your queries use the application variable. +-----------------------------------------------+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst Telecommunication Systems [EMAIL PROTECTED] +-----------------------------------------------+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -----Original Message----- From: mr_urc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 1:27 PM To: CF-Talk Subject: Re: Killing a cached query Quoting "Burcham, Steve" <[EMAIL PROTECTED]>: > What is the best way to 'kill' a cached query on a logout sequence? The only way that I know of to kill a cached query is to run the query with cachedwith set to one second. If there's a better way, I'd *love* to hear about it. (There are cachedwithins all over my website set for like 10 days but every few months when I update the site I have to go through the code and reset the cachedwiths to one second, then hit every page in the site.) By the way, I tried to set a request variable to put in cachedwithin so I could change it in only one place instead of every query in the site. It was not happy. It just dawned on me that maybe I have to put PreserveSingleQuotes() around it to make it work. Does anybody know before I go breaking my site? But if you are doing it on a logout, it seems like maybe you really want the query to exist in the session, not in the cache. If you store the query in a session, it'll die on logout or when the session times out. -- If you hate the interface, blame Kevin. ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists