pre-render and cache a component?
pre-render and cache a component?
- Subject: pre-render and cache a component?
- From: OC <email@hidden>
- Date: Fri, 13 Feb 2015 18:54:15 +0100
Hello there,
is it possible to pre-render a component to HTML string, and cache that string?
I thought this code would work:
=== code ===
...
private String cache=null
String componentContent {
if (!cache) {
def component=pageWithName(COMPONENT_NAME)
component.awake()
WOResponse nr=component.generateResponse()
cache=nr.contentString()
}
return cache
}
...
=== HTML ===
...
<wo:str value="$componentContent" escapeHTML="NO"/>
...
===
but it does not -- it messes up my current context, it seems.
Thanks for any advice,
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden