cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Keys for cache are insufficient when using multiple block servlets
Date Tue, 23 Jan 2007 20:25:54 GMT
Alexander Klimetschek skrev:
> Hi,
> 
> when using multiple block-servlets in one cocoon application (2.2), they 
> will all use the same EHDefaultStore as cache. If there are similar 
> matchers in the sitemaps, eg. images/header.png, the key for the cached 
> resource will be the same for both blocks (just images/header.png), and, 
> as the cache is global, the same cached object will be returned for both 
> requests. This happens with expires-caching.
> 
> This should be fixed by adding a unique key prefix for each 
> block-servlet or by one cache per block-servlet, but I do not know how 
> to configure this.

The Spring bean name for the block-servlet would work fine as an unique 
bean prefix. And it is available from ServletConfig.getServletName() in 
the block-servlet. The next and more complicated question is how to get 
the identifier to the caching key ...

/Daniel



Mime
View raw message