For those wanting to use the ExpiresCachingProcessingPipeline in example a poll or forum you are able to do this as follows:
add the parameters : <map:parameter name="expires" value="100000"/> <!-- just make sure it is large! --> <map:parameter name="purge-cache" value="{request-param:purge-cache}"/> Now your poll/forum is very long cached (100000 sec). When somebody votes/a new reaction is added, make sure that action is done with an extra parameter: purge-cache=true. This way, after a vote, the specific pipeline's cached is purged, and rebuild and again cached for very long (100000 sec). This way you can deliver high performance polls/fora. This is already available in ExpiresCachingProcessingPipeline in 2.1.8 AS ps what I still want to build is that you can define a time untill which the ExpiresCachingProcessingPipeline is valid, instead of giving it just an "arbitrary" value. Often I know that a pipeline is valid untill 0:00, BUT, since I dont know when the first request comes, I can not cache it longer then, say 5 minutes (so that it is cached maximally untill 0:04:59). More people interesting in this feature? -- Hippo Oosteinde 11 1017WT Amsterdam The Netherlands Tel +31 (0)20 5224466 ------------------------------------------------------------- [EMAIL PROTECTED] / http://www.hippo.nl -------------------------------------------------------------- > > Hi! > > I've just committed it. Please test it a little. I did a little stress > test with a pipeline that did an aggregate of around 100 parts > directly from the filesystem and serialized it to xml. The cached > response took 0-16 ms, while generating it took over 500 ms. > > Be aware that the default cache key for all pipelines is the exact uri > you used to generate it. This has always been so with the > ExpiresCachingProcessingPipeline. > If you need to write your own (maybe your pipeline also depends on > session attributes or request parameters), use it like this: > > <map:pipeline type="expires"> > <map:parameter name="cache-key" > value="mycachekey-{0}-{request-param:myparam}-{session-attr:myattr}"/> > > <map:match pattern="bla"> > ... > </map:match> > </map:pipeline> > > Then the cache key will be of the same form for _all_ matchers within > this block. If you need another form (i.e. add/remove parameters), you > need to declare a nother pipeline element and give it a new > "cache-key" parameter. > > By the way, "{0}" gives you the complete uri the matcher matched. > > Have fun! > max > > On 3/16/06, Ard Schrijvers <[EMAIL PROTECTED]> wrote: > > > > > Derek Hohls wrote: > > > > Any chance this will be in the forthcoming 2.1.9 release? > > > > > > I'm sat next to Ard right now so with a bit of luck, yes ;-) > > > > > > > Max is committing it. Should be available in 2.1.9 > > > > AS > > > > -- > > > > Hippo > > Oosteinde 11 > > 1017WT Amsterdam > > The Netherlands > > Tel +31 (0)20 5224466 > > ------------------------------------------------------------- > > [EMAIL PROTECTED] / http://www.hippo.nl > > -------------------------------------------------------------- > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]