ColdBox Framework Forums Notification: Post to Caching the Views

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.

thanks
http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=F5CD4686-FF65-CEF6-6545A5E9A4C9D5D3