> Why wouldn't he put it in an Application variable? If it's
> the same for everyone that would make the most sense to me.
> <!--- Application.cfm --->
> <cflock scope="application" timeout="30" type="exclusive">
> <cfif NOT IsDefined("application.ds")>
> <cfset Application.ds = "mydatasource">
> </cfif>
> </cflock>
>
> If you never EVER EVER set it anywhere else, you shouldn't
> need to lock it for reads, would you?
Two points.
1. If the variable's never going to change, why make it reside in memory?
The cost of creating and destroying a local or Request scoped variable is
infinitesimal.
2. If I never EVER EVER did anything I shouldn't, I'd be a much better
person. Application development shouldn't rely on the good graces of
individual programmers, wherever it's possible not to. If you create a
memory variable, you should assume that someone else, writing some other
script or maintaining your script after you've moved to other things, will
do the wrong thing.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
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.