> No reason at all.
>
> Depending on your ColdFusion version:
>
> 1) You may want to investigate the use of ColdFusions built in query
> cacheing as well
>
> 2) Remember to lock all access to application scope variables.

I'm told that locking isn't necessary in CFMX although I expect it will be a
while yet before we can consider CF 5 the acception rather than the rule.

Speaking of which, if you're using application variables to store queries (
which I assume won't change often ), then you may really want to use a
construct like this:

<cflock scope="application" type="readonly" timeout="10">
<cfset request.queryname = duplicate(application.queryname)>
</cflock>

<select name="yadda">
        <cfoutput query="request.queryname">
                <option value="#request.queryname.column#">
                #request.queryname.column2#</option>
        </cfoutput>
</select>

The reason for this is that you generally want to limit the amount of code
within the cflock whether it's exclusive or read-only, because an exclusive
lock will still have to wait for all read-only locks to complete before it
can begin to process its code, and if your app is chock full of

<cflock scope="application">
<cfoutput
query="application.myreallylargequeryicachedintheapplicationscope">
 ... < .5kb of code designed to display something from my query > ...
</cfoutput></cflock>

Then your application is going to have a tough time creating exclusive locks
to set those application variables... Also, when you set a query into the
application scope in an exclusive lock, don't lock around the cfquery or
cfstoredproc tags ... draw the query locally, then use duplicate() to copy
it to the application scope, similar to or rather inverse of the example
above.

You may already know a lot of this, but I think the refresher is always
good. And hopefully this information may be helpful to some of the other
less experienced list members as well. :)

hth

Isaac Dealey
www.turnkey.to
954-776-0046
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to