Use the cachedwithin attribute, then whenever the user updates the query, call the query without the cachedwithin attribute. Something like this:
------somequery.cfm <cfparam name="attributes.querytimeout" default="#createtimespan(0,1,0,0)#"> <cfquery ...... cachedwithin="#attributes.querytimeout#"> .. </cfquery> Then whenever the user updates data, call it like this. <cfmodule template="somequery.cfm" querytimeout="#createtimespan(0,0,0,0)#"> That will refresh the query with the new data. ----- Original Message ----- From: "Smith, Daron [PA]" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, March 28, 2002 11:08 AM Subject: Forcing Query Refresh (Sometimes) > I want to cache a query for 99% of the time. However, when users update the > data, I want to allow them an option to refresh the query and set that query > as the newly cached one. I can't use the cachedwithin attribute, or at > least not as I know of it, but I really could benefit from caching, just > when the data is updated I need to reset the cache. > > I know I could stop and start the CF service, but only I have access to this > option and it's not optimal. > > Thanks for any help, > > Daron J. Smith > Web Developer > PSEA > > [EMAIL PROTECTED] > 717-255-7141 > 1-800-944-PSEA (7732) x 7141 > Please note new email address (old one with 'mail' will soon expire) > > > 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 ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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