The problem seems to be that none of the query information is available
until the line in the code where the cfquery statement is.  Therefore, I
can't figure out a good way to skip over all the code.

I would use an application variable to flag weather the query is current
cached or not, and the time since it was first cached, but all this code is
in a .cfc and I want to keep it portable as possible.

Byron Mann

----- Original Message -----
From: "Matthew Walker" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 4:47 PM
Subject: RE: Cached Queries


> 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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to