cfquery.executionTime might be useful. In my experience it is 0 for cached queries. However it might conceivably return 0 for non-cached queries too.
Matthew Walker http://www.matthewwalker.net.nz/ > -----Original Message----- > From: Byron M [mailto:mbyron@;comcast.net] > Sent: Tuesday, 29 October 2002 10:37 a.m. > To: CF-Talk > Subject: Cached Queries > > > I have a bunch of code that I don't want to execute if a > query is cached. > > I tried this > > <cfif NOT isdefined("cachedQueryName")> > ... whole lotta code, then the query occurs > <cfquery name="cachedQueryName"> > </cfquery> > <cfelse> > ... skip all that code > </cfif> > > and it still doesn't seem to skip over the code. > > Basically all the code does some cfhttp calls and creates a > query, which I > then do a query of a query and cache that one. I only need > all the code to > run once a day (because it takes some time). I don't want it > to run every > call to the page. > > I guess the question is, is there some variable in the server > scope that > lists the names of the cached queries? > > Byron > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk 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.