cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Lundberg <>
Subject Event-aware caching problem
Date Sat, 14 Jan 2006 15:48:03 GMT
I have a strange problem with event-aware caching using Cocoon 2.1.8.
It works, in the sense that I get cached data. It does not work, in
the sense that each request takes several seconds to compute.

I put pages together by using xinclude, which calls stream.xq, to
compute the contents. As a first step, I wanted to cache the contents
of stream.xq. This process takes 15 seconds, according to the log.

INFO  (2006-01-14) 16:31.29:187 [access] (/cocoon/weblog/)
http-8080-Processor23/CocoonServlet: 'weblog/' Processed by Apache
Cocoon 2.1.8 in 15.281 seconds.

If I make just one call directly to stream.xq, it takes 3-5 seconds:

http-8080-Processor25/CocoonServlet: 'twinstreamraw.xq' Processed by
Apache Cocoon 2.1.8 in 3.344 seconds.

My cache setup is as follows:
      <map:pipeline type="event-aware">
      <map:match pattern="flow">
        <map:call function="cacheEvent"/>

     <map:match pattern="stream.xq">
                    <map:generate type="sample" src="cocoon:/stream.noncached">
                        <map:parameter name="use-request-parameters"
                     <map:serialize type="xml"/>

The source of <map:generate type="sample"
src="cocoon:/stream.noncached"> is a call to an xQuery:

<map:match pattern="stream.noncached">
         <map:generate src="xq/stream.xq" type="xquery">
              <map:parameter name="use-request-parameters" value="true"/>
<map:serialize type="xml"/>

>From this test, event-aware caching seems pointless.... since
generating the page in the first place, takes this amout of time... so
I guess I have made a mistake somewhere. What could that be? Ideas?
Suggestions? Is the xquery executed even though cached contents are

(To generate the event-cache test page in the block sample, goes
somewhat faster:
INFO  (2006-01-14) 16:44.10:843 [access]
http-8080-Processor23/CocoonServlet: 'samples/blocks/eventcache/demo'
Processed by Apache Cocoon 2.1.8 in 15 milliseconds.)

I'd be happy for any ideas about what happens here.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message