Cool, that�s what I was thinking, its nice to double check. I'm mx, so I guess I'll have to change them all to application scope :)
I've not stored constants there before, do I still have to set them in the application.cfm file? That will mean they get overwritten every request? On 7/9/03 14:33, "Gyrus" <[EMAIL PROTECTED]> wrote: > At 13:24 07/09/2003 +0100, you wrote: >> I've just developed a site where I have a lot of request variables defined >> in application.cfm, which are constant values... >> >> Would there be benefit in defining these as application variables? > > If you're using CFMX, probably best to store constants in the Application > scope. Unless there are "race condition" risks (i.e. risk of two processes > updating a value at once), which is very unlikely with constants, you don't > need to lock the scope when you access the vars. Then you've got them all > stored once for the whole application, whereas putting them in the Request > scope stores them in memory once for every current request. > > Pre-MX, my rules-of-thumb are: > > - Store frequently accessed constants and variables in the Request scope > for ease of access > - Store anything only accessed once or twice during any request in the > Application scope, and remember to lock when reading > - The larger and less frequently accessed the data, the better candidate it > is for storing in Application, and vice versa for Request > > HTH, > > Gyrus > [EMAIL PROTECTED] > play: http://norlonto.net/ > work: http://tengai.co.uk/ > PGP key available > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com

