Thanks Jan. Very interested in the SiteVoter of course. Will continue the 
experiment with my own voter.

Ciao, Bert
________________________________
Van: [email protected] [[email protected]] namens 
Jan Haderka [[email protected]]
Verzonden: woensdag 21 juli 2010 11:28
Aan: Magnolia User-List
Onderwerp: Re: [magnolia-user] cache filter configuration bypass does not work


On Jul 20, 2010, at 5:25 PM, Bert Leunis wrote:

Hello Magnolians,

Here at Vpro headquarters we try to configure caching for multisites. Besides 
the documentation for the cache module and advance cache module, this blog by 
Jan gave us a lot of useful and detailed information:

http://weblogs.java.net/blog/rah003/archive/2010/03/24/flush-cache

Glad you found it useful


We configured two cache filters, like the blog describes (see attached image 
for our config). Unfortunately the URIStartsWithVoter does not work the way we 
expect. When the voter is used, it tries to see if the current URI starts with 
the pattern (/hollanddoc in this case). The method 
info.magnolia.voting.voters.BasePatternVoter.resolveURIFromValue(Object) 
returns "/service.html" for the request on url: 
"http://localhost:8081/magnolia-site/hollanddoc/service.html"; but it should 
return "/hollanddoc/service.html".

The input parameter for the mentioned method is of type 
org.apache.catalina.connector.RequestFacade, so this line produces the return 
value:

uri = MgnlContext.getAggregationState().getCurrentURI();

This causes "/service.html" to be returned, instead of 
"/hollanddoc/service.html".

How to solve this problem? Do we need to use another voter, something like a 
BrowserURIStartsWithVoter? I think this one does not exist yet.

yes you need different voter. Either for BrowserURI or for Site itself. I've 
got one for Site (but not written by myself) ... will try to get it published 
soon.

Cheers,
Jan


Advice much appreciated! Thanks,
Bert


________________________________
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: 
<[email protected]<mailto:[email protected]>>
----------------------------------------------------------------
<cache_config.PNG><aggregationstate.PNG>




________________________________
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to