Just run your query again with cachedwithin="#CreateTimeSpan(0,0,0,0)#"

I take the lazy way out.

When building an app I set a request.QueryCacheTime value to whatever
desired and then simply reference that in my queries where appropriate. When
data is updated I reset request.QueryCacheTime to zero and call the query
again to flush it. Next time someone runs that query it gets cached with the
new data.

Of course, having your query files seperated in good FuseBox fashion (hint,
hint, http://www.fusebox.org) makes the whole process much simpler since the
query needs to be exactly identical each time called...no extra spaces
anywhere.

Ken


-----Original Message-----
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 12:03 PM
To: CF-Talk
Subject: Best way to clear Cached Queries?


What's the best way to clear out a cached query, so that your
production site will use the most current database information? I want
to retain my long cache spans on a production box, but I want to be
able to "update" or "refresh" the queries at will.

Here is my current process:
1. Break the connection (give the datasource a faulty path/name) in
the administrator.
2. Hit the template in a browser.
3. Repair the broken connection in the CF administrator.
4. Hit the page again. The query is updated/re-cached.

I don't like this method, because it is awkward, and it momentarily
affects the production site. Is there a better way?

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

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to