giacomo wrote:
>> - Using <map:match type="regexp" pattern="..."> and
>> <map:parameter>-tags, I made an XSP-page which takes the parameters and
>> generates SVG for navigational images, effectively turning a URI like
>> /image/navigation/black/white/Cocoon%202.jpg into an JPEG image with a
>> black "Cocoon 2" text on a white background; it worked perfectly,
>> changing the colors or the text changes the resulting images. Sadly, the
>> caching performance is nonexistant, as there is just one cached stream
>> result per pipeline instead of one cached stream result per URL per
>> pipeline; I am currently looking for easy ways to resolve this design
>> issue and I would be happy to hear any ideas.
>
>
> XSP are by default NOT cacheable. I wasn't aware of the fact that the
> util logicsheet has a cacheable element. I've made a caching logicsheet
XSP is by default not cachable, I agree; I forgot mentioning that I am
using the following
snippet in the XSP to enable caching as it was done by the aggregate.xsp
example.
<xsp:logic>
/**
* Generate the validity object.
*
* @return The generated validity object or <code>null</code> if the
* component is currently not cacheable.
*/
public org.apache.cocoon.caching.CacheValidity generateValidity() {
java.util.HashMap map = new java.util.HashMap();
map.put("foreground", parameters.getParameter("foreground",
"black"));
map.put("background", parameters.getParameter("background",
"white"));
map.put("level", parameters.getParameter("level", "1"));
map.put("state", parameters.getParameter("state", "ended"));
map.put("text", parameters.getParameter("text", ""));
return new
org.apache.cocoon.caching.ParametersCacheValidity(map);
}
</xsp:logic>
As you can see, it is made cachable depending on parameters that are
determined at
sitemap level - I am taking them out of the URL the XSP is accessed
with using a regexp
matcher in the sitemap. I have further tested my changes in
CachingStreamPipeline
concerning caching multiple results of one source being accessed via
different URLs, and
I am getting a performance improvement; the log output shows its
working, too.
Whom shall I send a diff of CachingStreamPipeline.java with my small
changes for review
and integration ? Whats the standard procedure at this point ?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]