Title: RE: Caching the Views
Thread: Caching the Views
Forum: Need Help?
Conference: ColdBox
User: sanaullah73 Hi
Here is quick demo code .... you can cache anything in layouts,
controllers etc
<cfif not getController().getColdboxOCM().lookup('myView1')>
<cfsavecontent = "myView1">
<cfoutput>
RenderView("viewname")
</cfoutput>
</cfsavcontent>
getController().getColdboxOCM().set(any objectKey, any
MyObject, Timeout= ,LastAccessTimeout= )
<cfelse>
<cfoutput>getController().getColdboxOCM().get('myView')</cfoutput>
</cfif>
any problem, let us know.