Title: RE: persistent user object in CB
Thread: persistent user object in CB
Forum: Need Help?
Conference: ColdBox
User: sanaullah73 Hi,
1: ?
leave the cache attributes as it is. its nothing to do with
values/objects storage.
2: ?
As far I know most of the Apps use cfc-objects,
complex-values in application scope and theres no performance issue.
3: ?
[code]
<cffunction name="onRequestStart" access="public" returntype="void"
output="false">
<cfargument name="Event"
type="coldbox.system.beans.requestContext">
<!--- On Request Start Code Here
--->
<cfset var obj1 = createobject("component"."your-component") />
<cfset var obj2 = createobject("component"."your-component") />
<cfset var
obj3 = createobject("component"."your-component") />
<cfset
getPlugin("applicationstorage").setVar("obj1",obj1) />
<cfset
getPlugin("applicationstorage").setVar("obj2",obj2) />
<cfset
getPlugin("applicationstorage").setVar("obj3",obj3) />
</cffunction>
<cffunction name="onRequestEnd" access="public" returntype="void"
output="false">
<cfargument name="Event"
type="coldbox.system.beans.requestContext">
<!--- ON Request End Here --->
<!--- set in rc scope --->
<cfset
Event.setValue("obj1",getPlugin("applicationstorage").getVar("obj1") ) />
<cfset Event.setValue("obj2",getPlugin("applicationstorage").getVar("obj2") ) />
<cfset Event.setValue("obj3",getPlugin("applicationstorage").getVar("obj3") )
/>
</cffunction>
[/code]
I would suggest to read coldbox docs, you will
get many answers.