Actually, after reading the OP again and reading the proposed solutions, I will have to agree with the OP to configure it for this very important reason:
This is in onApplicationStart ()
APPLICTION.AppInfo = structNew(); APPLICTION.AppInfo.VariableOne = "SomeStringOne"; APPLICTION.AppInfo.VariableTwo = "SomeStringTwo";
It can then be drawn to this, inside onRequestStart ()
<cflock name="tmp" type="readonly" timeout="15"> <cfset REQUEST.AppInfo = APPLICATION.AppInfo /> </cflock>
Then your application can quickly go to the REQUEST windows, for example, if you decide that you want to cache CFC in the same area, they simply go to a separate key:
APPLICATION.Model.MyObject = CreateObject('component','myobject');
Which, of course, also translates into a REQUEST (if you choose)
Want to go the Jake Feisel route higher? No problems:
<cfif isDefined('URL.reload')> <cfset APPLICATION.Model = StructNew() /> </cfif>
Now you can flexibly kill the cache of objects, but keep your vars (or vice versa, as you choose).
This is a great setting for another reason: if you want to create your own development / production mode in which the development mode always recompiles CFC, but the production mode saves them in the cache. The only change you should make on top of this is the REQUEST noted above:
<cfif (isProduction)> <cflock name="tmp" type="readonly" timeout="15"> <cfset REQUEST.AppInfo = APPLICATION.AppInfo /> </cflock> <cfelse> <cfset REQUEST.AppInfo = StructNew() /> <cfset REQUEST.AppInfo.VariableOne = "SomeStringOne" /> ...etc... </cfif>
You can also configure vars and create objects as a private method in Application.cfc for even more convenience.