At 09:39 PM 10/6/00 -0600, you wrote:
>Is it advisable to use locking when referencing a cached query?  I would
>assume a cached query fits the bill of being shared data.  If so, then
>wouldn't the lock need to be around the <cfquery> statment as well as
>references to any query values?

You don't need to lock MyQuery if you name it Request.MyQuery (that is, 
give it Request scope).

>Does modifying the contents of a cached query 'dirty' the cache, so that the
>query would automatically be run again on the next reference, or will the
>query remain (in its modified state) until the cache period expires?


A cached query is a cached query.  You reference it by its name in your CF 
templates, but CF includes, in addition, reference by SQL.  So if  by 
"modifying the contents of a cached query" you mean you have a dynamic 
query that's cached, for example:

<CFQUERY Name = "MyQuery"

SELECT * FROM MyTable WHERE ID = #FORM.ID#

then CF will cache a distinct dataset for each value of #FORM.ID#


OTOH, if by "modifying the contents of a cached query" you mean you modify 
the data in the underlying database, my *guess* is that this does not 
affect the cached query until it's requested after it times out.

HTH

best,  paul


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to