Re: Flushing Cached Queries
after the database update use a ? http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b11.htm On 10/24/05, John Beynon <[EMAIL PROTECTED]> wrote: > set cachedwithin to 0? > > >Okay, this is probably something obvious I'm either overlooking or not > >thinking of. For some reason, I can figure out the really complicated > >things far easier than the ones that should be simple. Anyway > > > >Is there a way to force CF 6.1 to update a cached query programatically. > > That is, is there a way to force the query to re-run even if the > >timeout specified in cachedwithin is not up yet. > > > >We've got a client who runs a database update routine at a certain time, > >and we want to try and run the query just before (to cache it across the > >update) and just after (to pick up the updated data). Ideas? > > > >--Ben > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222065 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Flushing Cached Queries
> Is there a way to force CF 6.1 to update a cached > query programatically. There are a couple of potential options off the top of my head. If the times that the query is run are set, you could use a cachedwithin attribute to force it to expire after a certain period. If you want to force a flush, you could invoke the CF factory object and force it to flush all queries. To invoke the factory... You can CFDUMP the factory object to find the exact method to call, I don't remember what it is off hand. -Justin Scott ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222063 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Flushing Cached Queries
If it's a specific query you can use cachedwithin="#creattimespan(0,0,0,0)#" You might also consider "cachedafter" - sounds like it fits your problem. I have a blog on this very topic :) http://mkruger.cfwebtools.com/index.cfm/2005/10/13/safe.caching -Mark -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 10:43 AM To: CF-Talk Subject: Flushing Cached Queries Okay, this is probably something obvious I'm either overlooking or not thinking of. For some reason, I can figure out the really complicated things far easier than the ones that should be simple. Anyway Is there a way to force CF 6.1 to update a cached query programatically. That is, is there a way to force the query to re-run even if the timeout specified in cachedwithin is not up yet. We've got a client who runs a database update routine at a certain time, and we want to try and run the query just before (to cache it across the update) and just after (to pick up the updated data). Ideas? --Ben ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222061 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Flushing Cached Queries
set cachedwithin to 0? >Okay, this is probably something obvious I'm either overlooking or not >thinking of. For some reason, I can figure out the really complicated >things far easier than the ones that should be simple. Anyway > >Is there a way to force CF 6.1 to update a cached query programatically. > That is, is there a way to force the query to re-run even if the >timeout specified in cachedwithin is not up yet. > >We've got a client who runs a database update routine at a certain time, >and we want to try and run the query just before (to cache it across the >update) and just after (to pick up the updated data). Ideas? > >--Ben ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222059 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Flushing cached queries
Dana, set the cachedwithin time to 0. (Still no city, eh?) -David > If you are caching queries, is there a way to force CF > to flush them? YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.