cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Adding serializer info to SitemapSource
Date Tue, 07 Jun 2005 17:33:35 GMT
Hi all,

As mentioned in my previous post, I'm using background "cocoon:" URLs to 
feed the cache with costly pages to speedup response time when a user 
asks for that same URL.

The problem with this approach is that when processing internal 
requests, the associated cache key strips out the serializer part. The 
bad result of this is that a single URL leads to two different cache 
entries if called externally (http:) or internally (cocoon:), this 
defeating the prefetch strategy.

To circumvent the problem, I just had to create a subclass of 
CachingProcessingPipeline with a single method:

    public void prepareInternal(Environment environment) throws 
ProcessingException {
        preparePipeline(environment);
    }

And it worked like a charm!

So the question is why do we remove the serializer information from the 
key and validity for an internal request? Furthermore considering that 
calling getInputStream() on a "cocoon:" source *does* use the Serializer.

I'd like to remove this distinction and have the full pipeline key be 
used il all cases.

Thoughts, objections?

Sylvain

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111816379808621&w=2

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message