The cache is based on the QUERY="myQuery". If that query is altered
(dynamic) from when the cache was created - basically a totally
different query - the cache would be recreated using the new SQL that
was requested.

Peter Tilbrook
Managing Director, ColdGen Internet Solutions
Professional Adobe ColdFusion 9 Application Development
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

Tel: +61-2-6284-2727
Mob: +61-2-0457-449-016

Email Address: pe...@coldgen.com
WWW: http://www.coldgen.com/

ABN: 80 826 226 128



On 21 June 2011 17:06, ColdGen Internet Solutions
<coldgen.internet.soluti...@gmail.com> wrote:
> Yes if the query is "dynamic" it would be re-retrieved from the
> database server. And then cached. Unless the original query was not
> altered the cache would remain.
>
> So keep the cache in place unless the query is more dynamic than
> static - otherwise the memory and resources could probably be better
> used by the system elsewhere.
>
> Peter Tilbrook
> Managing Director, ColdGen Internet Solutions
> Professional Adobe ColdFusion 9 Application Development
> President, ACT and Region ColdFusion Users Group
> PO Box 2247
> Queanbeyan, NSW, 2620
> AUSTRALIA
>
> Tel: +61-2-6284-2727
> Mob: +61-2-0457-449-016
>
> Email Address: pe...@coldgen.com
> WWW: http://www.coldgen.com/
>
> ABN: 80 826 226 128
>
>
>
> On 21 June 2011 17:02, Andrew <am2...@gmail.com> wrote:
>> Hi,
>>
>> A colleague has asked me to investigate some code that he claims used
>> to cache, but at some point recently doesn't anymore.
>>
>> Sadly, I can't replicate the exact code / query here (I expect my boss
>> would have a fit if I did), but to "paraphrase" it, it's something
>> like:
>>
>> <cfquery name="qCount" datasource="somedatasource"
>> cachedwithin="#CreateTimeSpan(0,5,0,0)#">
>>    ....
>> </cfquery>
>>
>> Please take my word for it that the query does not change, but it DOES
>> have a couple of nested selects (not sure that would be a factor?).
>>
>> I set up a test page, and it appears to remain cached for a couple of
>> minutes and then disappear from the cache.
>>
>> The CF Administrator is set to cache 100 queries, and looking at the
>> monitor it seems to flucuate between about 2 and 8 cached queries in
>> total, so I am pretty sure we aren't hitting the limit.
>>
>> So my question is - how can I debug this?  I believe the requirements
>> specified in the doco are being meet, eg:
>>
>> "the current query must use the same SQL statement, data source, query
>> name, user name, and password"
>>
>> However, one possible thing I can think of is, what if there was the
>> same SQL statement being called with a different datasource.  Would
>> that cause this one to be lost?  Or would they both be cached
>> independently?  Because this is a possibility, as we have a staging
>> instance on the same coldfusion instance.
>>
>> Hopefully that all makes sense...it's a bit hard to explain...
>>
>> Andrew.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "cfaussie" group.
>> To post to this group, send email to cfaussie@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> cfaussie+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/cfaussie?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to