I need a reality check - and, hopefully, an explanation (if my reality is wrong).
The way CF application framework evaluates things is (my understanding) - the request is passed to cfserver
cf finds application.cfm or cfc (based on move rules)
application.cfc is executed (if found)
the IT area is set (a series of specific applications can be set here, but
some are required - for example, applicationTimeout - then a series of events occurs - and if necessary, methods are launched.
- onApplicationStart ()
---- onSessionStart ()
------ onRequestStart ()
and etc.
so my questions
1) DATA settings are performed at each page request - before anything else?
2) If I set the application variable in onApplicationStart () - it is available in any process that occurs after that - And it must be stored in memory for the length of applicationTimeout () - right?
3), so if I do something like this ...
if (isdefined ("application.myvar") {this.something = application.myvar;}
SHOULD work on any page request after the initial request that launched the scope.
however, this does not seem to be the case.
My reason for the request is that there are some interesting application leverage settings that need to be set in the IT area ... some of them can be "intensive" (at least from the point of view of execution on each request - so I want to do them only ONCE, set the structure to permanent mem, and then use those that are available as IT.
Am I making the wrong assumptions?
THX
coldfusion
jpmyob
source share