cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boon Hian Tek <b...@bhtek.dyndns.org>
Subject Re: new PDF caching sample - unable to get caching to work
Date Thu, 01 May 2003 15:27:21 GMT
Bertrand Delacretaz wrote:

> I'm unable to get caching to work in a sample that I just added to 
> the  FOP block (under src/blocks/fop/samples/).
>
> Problem: the Generator output is cached correctly but FOP is called  
> every time to convert the XSL-FO to PDF.
>
> What I'm trying to do is to have Cocoon cache the generated PDF to  
> avoid calling FOP again if the Generator says that the data is sill  
> valid.
>
> Here's the pipeline (full sitemap is in CVS):
>
> <map:pipeline type="caching">
> ...
>             <!-- reuse the XSP caching example for our caching test -->
>             <map:match pattern="cache-test-*-*-*.pdf">
>                 <map:generate  src="cocoon://samples/xsp/java/ 
> cacheable?pageKey={1}&amp;other={2}&amp;validity=30"/>
>                 <map:transform src="cache-test/xsp-sample-to-fo.xsl">
>                     <map:parameter name="pages" value="{3}"/>
>                 </map:transform>
>                 <map:serialize type="fo2pdf"/>
>             </map:match>
>
> </map:pipeline>
>
> Am I doing something wrong?
> I read about the caching-point pipeline but IIUC it shouldn't be 
> needed  in this case.
>
> There is a bug at  
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14348 that says  
> "Caching problem with XSP, XSL and cocoon pseudo protocol" but it's 
> not  the same problem I think.
>
> Thanks for any hints.
> -Bertrand
>
Hi Bertrand,

Looking at a glance at the serializer for FOP, I see that the getKey 
method that returns the cache key, returns
a "1" constantly. Not sure if this could be the problem.

public Serializable getKey() {
        return "1";
}

Boon

P.S. I am relatively new to cocoon, so I may be WAAAAAAY off.


Mime
View raw message