Re: Manually flush all cached queries?
will clear ALL of them. To clear one query, rerun the query with the EXACT same settings (sql, attributes, etc) but with a timeout of zero. When I say exact same - it must be the exact same even when it comes to white space. On 9/7/06, Jeff Guillaume <[EMAIL PROTECTED]> wrote: > I fear I already know the answer to this, but is it possible? > > We use cachedwithin queries all over the place and want to be able to "flush" > CF's memory when needed to reflect changes from the database immediately. Is > there any way to do this other than restarting the CF service? I know you > can zero out the cachedwithin times, but that doesn't seem feasible as the > caches are in all sorts of CFCs and have various timeouts assigned. > > Thanks. > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252384 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Manually flush all cached queries?
Just went through this yesterday. Basically you can add a space or change the query so CF thinks it's a new query and it won't use the cached version. However, that only works for a single query. Otherwise, you have to restart the server. Jeff Guillaume wrote: > I fear I already know the answer to this, but is it possible? > > We use cachedwithin queries all over the place and want to be able to "flush" > CF's memory when needed to reflect changes from the database immediately. Is > there any way to do this other than restarting the CF service? I know you > can zero out the cachedwithin times, but that doesn't seem feasible as the > caches are in all sorts of CFCs and have various timeouts assigned. > > Thanks. > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252377 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Manually flush all cached queries?
I fear I already know the answer to this, but is it possible? We use cachedwithin queries all over the place and want to be able to "flush" CF's memory when needed to reflect changes from the database immediately. Is there any way to do this other than restarting the CF service? I know you can zero out the cachedwithin times, but that doesn't seem feasible as the caches are in all sorts of CFCs and have various timeouts assigned. Thanks. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252376 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Manually flush all cached queries?
Self-followup: I researched a bit and came up with . It seems to do the trick, although I've just read elsewhere that it may not clear all queries. However, some is better than none for my purposes and it worked in my test just now. Anyone used it before? I had never even heard about it. Thanks, Jeff ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252385 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Manually flush all cached queries?
Thank you, Raymond. (I just posted my self-followup coming to the same conclusion before your response came in.) Clearing all of the queries is exactly what I wanted to do, so problem solved. > will clear ALL of them. > > To clear one query, rerun the query with the EXACT same settings (sql, > > attributes, etc) but with a timeout of zero. When I say exact same - > it must be the exact same even when it comes to white space. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252386 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Manually flush all cached queries?
> I know you can zero out the cachedwithin times, but that > doesn't seem feasible as the caches are in all sorts of CFCs and have > various timeouts assigned. It's worth noting that the caching is keyed on the text of the query. And once you execute it once with a timeout low enough that it hits the database, that updated data will be available to all of the places that query is run with a longer timeout. So if you can, immediately after an operation that should invalidate the cache, run that query with a zero second window, that new data will be visible in all of those other CFCs. (On a side note, perhaps it would be wise to factor these queries out into their own methods/CFCs, with an argument to specify the cachedwithin value that should be used. Then your cache-invalidation procedure would just be to invoke the same method everything else does, with a lower value. And everyone is guaranteed to share the same query code.) Sixten ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252383 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4