Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
ben_lclc #1
application variables, cflock, and best-practise
i have a number of application variables that i store once but access
frequently (a few times per page). the simple question is "should i be
read-only locking every time i access an application variable" but i guess this
is really an open-ended question on the usage and best-practice of application
variables.
for instance i need to show some data from a database on (nearly) every page
in my app (sometimes more than once) - this data changes rarely. ideally i
would want to keep that query in an application variable and i can understand
the need to use a lock each time i read the data.
on the other hand i have lots of little application variables (DSN, cfcRoot,
wwwRoot) that are used frequently throughout a page/request (data never/rarely
changes), would i have to lock the application each time i access one or should
i instead use the request scope?
from reading numerous articles from around the web my opinion is that perhaps
i should use the request scope for the simple, much-used variables and the
application scope for more complex variable (query, xml, cfc).
could anyone offer any light on the issue?
thanks,
ben
ben_lclc Guest
-
Problem with Application variables using Application.cfc
Hi guys, I'm using CFMX7 and with that the Application.cfc. I've defined the app variables using <cfset This.varname = "something"> I would like... -
Session variables and CFLOCK
I'm working with a simple example using CFLOCK to set a variable's scope to session and then access that session variable from another page. But... -
Session Variables and CFlock tags
Recently our web site is throwing a lot of 'Timed out while waiting to obtain exclusive access on session variables'. Does anyone have a clue why... -
cflock and session variables
Do I need to lock code that checks if a session is defined? Which one of these is the correct approach? <cflock scope="session" type="exclusive"... -
Global variables - application variables vs include file
What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include...



Reply With Quote

