Re: Flushing All Cached Queries
Thursday, February 27, 2003, 6:48:53 PM, you wrote: >> Supposedly...I've never found that to be the case though. >> It only seems to work at a template level for me, refreshing >> any cached queries that are executed after the cfobjectcache >> statement during the request. Any other cached queries for >> that application remain cached, unaffected by cfobjectcache. >> Any cached queries that are executed before the cfobjectcache >> statement will refresh the next time the query is executed. >> This applies to CF5, I don't know about MX. >> >> If there is a trick I am missing I'd love to know about it. DW> That's odd. I remember you mentioning this before. I just built a very DW> simple test case, consisting of two separate pages, one containing a CFQUERY DW> with CACHEDWITHIN and the other containing CFOBJECTCACHE. I then turned on DW> debugging, and ran the query page twice (the second time to cache the DW> query), then ran the second page, then reran the query page, and the query DW> was no longer cached. I did this under CF 5 and CFMX. It worked under both. Running a quick test case seemed to confirm that is does indeed work as it should using cachedwithin queries. Running the test case though I found out that apparently CF ignores the name attribute of a cached query when deciding whether to return a cached recordset it and only uses the sql. Learn something new every day... This may have been the cause of my confusion, as the only place I have tested cfobjectcache was on a server with a bunch of nearly identical applications. So i would go from site to site seeing the queries cached, even though the page had never been executed. For now, I guess I'll have to take back my post. :) -- jon mailto:[EMAIL PROTECTED] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Flushing All Cached Queries
> -Original Message- > From: jon hall [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 27, 2003 5:21 PM > To: CF-Talk > Subject: Re: Flushing All Cached Queries > > > Supposedly...I've never found that to be the case though. It only > seems to work at a template level for me, refreshing any cached > queries that are executed after the cfobjectcache statement during the > request. Any other cached queries for that application remain cached, > unaffected by cfobjectcache. Any cached queries that are executed > before the cfobjectcache statement will refresh the next time the > query is executed. > This applies to CF5, I don't know about MX. > > If there is a trick I am missing I'd love to know about it. I just tested this on CF 5.0 and CFMX, and I got the same behavior. CFOBJECTCACHE clears all queries that are cached with cachedwithin, no matter what application they belong to. I created a directory structure like so: codetesting objectcache app1 app2 App1 and App2 had their own application.cfm and index.cfm files. App1 was named "CodeTestingApp1", App2 was named "CodeTestingApp2". I used the same queries in each index.cfm page first, then I tested with two different queries. Each time I ran the test, both queries had different names. Performing a cfobjectcache action="clear" in the index.cfm in App2 after all other cfml, the query was never cached, as expected. After running App1 to cache the query, running App2 causes a different query to be run and after, the object cache is cleared. Running App1 right after this shows that cfobjectcache did indeed clear the cached query in App1. I then tested again with queries cached in the Application scope, not using cachedwithin. CFOBJECTCACHE does not affect queries cached in the Application scope, it seems; it only affects queries cached with cachedwithin and perhaps (not tested) cachedafter. The documentation on this tag is somewhat confusing. The action="CLEAR" attribute says it "Clears queries from the cache in the Application scope", while the actual Description of the tag says "Flushes the query cache." Since this is obviously not all true (cfobjectcache does NOT clear queries in the Application scope, based on my testing in CF 5.0 and CFMX), the docs on this tag don't appear to be fully correct. The Livedocs on this tag are the same as the ones I have installed in CF Studio 4.5.2. --Andy ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Flushing All Cached Queries
> Supposedly...I've never found that to be the case though. > It only seems to work at a template level for me, refreshing > any cached queries that are executed after the cfobjectcache > statement during the request. Any other cached queries for > that application remain cached, unaffected by cfobjectcache. > Any cached queries that are executed before the cfobjectcache > statement will refresh the next time the query is executed. > This applies to CF5, I don't know about MX. > > If there is a trick I am missing I'd love to know about it. That's odd. I remember you mentioning this before. I just built a very simple test case, consisting of two separate pages, one containing a CFQUERY with CACHEDWITHIN and the other containing CFOBJECTCACHE. I then turned on debugging, and ran the query page twice (the second time to cache the query), then ran the second page, then reran the query page, and the query was no longer cached. I did this under CF 5 and CFMX. It worked under both. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Flushing All Cached Queries
Supposedly...I've never found that to be the case though. It only seems to work at a template level for me, refreshing any cached queries that are executed after the cfobjectcache statement during the request. Any other cached queries for that application remain cached, unaffected by cfobjectcache. Any cached queries that are executed before the cfobjectcache statement will refresh the next time the query is executed. This applies to CF5, I don't know about MX. If there is a trick I am missing I'd love to know about it. -- jon mailto:[EMAIL PROTECTED] Thursday, February 27, 2003, 5:05:28 PM, you wrote: >> When using the , >> Does it flush just the cached queries in the application, >> or on all applications across the server? DW> It flushes all cached queries on the server. DW> Dave Watts, CTO, Fig Leaf Software DW> http://www.figleaf.com/ DW> voice: (202) 797-5496 DW> fax: (202) 797-5444 DW> ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Flushing All Cached Queries
> When using the , > Does it flush just the cached queries in the application, > or on all applications across the server? It flushes all cached queries on the server. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4