Nevermind... I solved it by implementing Event Caching in the Xquery
Generator, as described in the Event Caching block.
Thanks anyway for the explanation!
Regards
Hans
On 1/14/06, Jonas Lundberg <[EMAIL PROTECTED]> wrote:
> Yes, I would completely understand this, if the contents were not cached at
> all.
> But the contents *appear* to be cached since I get the same output
> from the pipeline, until it is invalidated.
> However, the contens *also* appear to be non-cached, since it takes so
> long to retrieve them...
> What would cause this?
>
> Regards
> Hans
>
>
>
> On 1/14/06, Ard Schrijvers <[EMAIL PROTECTED]> wrote:
> > Do I understand correctly that you want a cached pipeline, but depends on
> > someting like
> > <map:generate type="sample" src="cocoon:/stream.noncached">, where I
> > suppose this part is not cached? Well, in that case, total caching of a
> > pipeline can only work, if, and only if, all depending child pipelines can
> > and are cached. So the example you describe seems you want something that
> > is not possible.
> >
> > AS
> >
> >
> > By the way, wacht out for <map:parameter name="use-request-parameters"
> > value="true"/>...it can cause real nasty caching problems when your site
> > goes live and gets crawled by search engines. Define your parameters like:
> >
> > <map:parameter name="param1" value="{request-param:param1}" />
> > <map:parameter name="param2" value="{request-param:param2}" />
> > <map:parameter name="param3" value="{request-param:param3}" />
> >
> >
> >
> > >
> > >
> > > 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:
> > >
> > > (/cocoon/sream.xq?streampattern=blogcomment_admin&pageKey=one&
> > > imageprefix=../../&id=cocoon&discussion=conferences&url=HHID19
> > > /Blipp/12.0&base=diskutera/)
> > > 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>
> > >
> > > <map:match pattern="stream.xq">
> > > <map:generate type="sample"
> > > src="cocoon:/stream.noncached">
> > > <map:parameter name="use-request-parameters"
> > > value="true"/>
> > > </map:generate>
> > > <map:serialize type="xml"/>
> > > </map:match>
> > > </map:pipeline>
> > >
> > > 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:generate>
> > > <map:serialize type="xml"/>
> > > </map:match>
> > >
> > > 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
> > > displayed?
> > >
> > > (To generate the event-cache test page in the block sample, goes
> > > somewhat faster:
> > > INFO (2006-01-14) 16:44.10:843 [access]
> > > (/cocoon/samples/blocks/eventcache/demo?pageKey=one&rand=75342
> > > 13488853639168)
> > > 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.
> > >
> > > Regards
> > > Hans
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]