cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <>
Subject RE: Caching source protocol and flowscript
Date Thu, 23 Nov 2006 21:40:17 GMT

I never used cached: directly like this...think it certainly does not make sense to put it
in a map:redirect-to. 

All you should do, is replace 
<map:redirect-to uri="cached:cocoon:/eu/do_{2}?cocoon:cache-expires=60" />

with something like 

<map:redirect-to uri="cocoon:/eu/do_{2}" />

and add a pattern match="cocoon:/eu/do_{2}" (which you already have probably)

and put this in a caching pipeline, like

<map:pipeline type="caching">


Now, if the cocoon:/eu/do_{2} consists of only cacheable components, your cache should be
just fine!

Though, making seperate matchers for admin and eu in the first place make much more sense
to me,



In my application, I would like to cache the response of a JavaFlow method for the end users,
and not for the admins.
For that, I am using the two following pipelines : 

            <map:match pattern="(admin|eu)/do_cached_(.*)$" type="regexp">
                <map:select type="parameter">
                    <map:parameter name="parameter-selector-test" value="{1}" />
                    <map:when test="eu">
                        <map:redirect-to uri="cached:cocoon:/eu/do_{2}?cocoon:cache-expires=60"
                    <map:when test="admin">
                        <map:call function="{2}" />

            <map:match pattern="(admin|eu)/do_(.*)$" type="regexp">
                <map:call function="{2}" />

It works well except when I add the "cached:" protocol :(
Is that possible to use the "cached" protocol for pipelines calling the FlowScript ? If no,
do you know a workaround to that ?

Best Regards, 

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

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

View raw message