See http://jira.magnolia-cms.com/browse/MGNLSTK-667 and 
http://svn.magnolia-cms.com/svn/community/modules/standard-templating-kit/trunk/magnolia-module-standard-templating-kit/src/main/java/info/magnolia/module/templatingkit/voters/SiteURIPatternVoter.java

Voter allows you to restrict application of the pattern to given site/domain 
only. In cache you would restrict the domain and apply to all the content in 
given domain.

just one extra question. If I still remember right what I wrote (can't get to 
java.net right now) in that article, you are supposed to configure one instance 
of the filter and one cache per site. Since you specify cache configuration 
(and therefore instance of the cache to use) in the filter, there is no need to 
limit the cache by the voter since it will be chosen by the filter or did i 
miss something in your description of the problem?

Cheers,
Jan

On Jul 21, 2010, at 11:55 AM, Bert Leunis wrote:

> 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]>
>> ----------------------------------------------------------------
>> <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]>
> ----------------------------------------------------------------

-  
Best regards,

Jan Haderka, PhD.
Magnolia International Ltd.

http://www.magnolia-cms.com

You should join us at Magnolia Conference 2010: 
http://www.magnolia-cms.com/conference

http://twitter.com/magnolia_cms
http://facebook.com/Magnolia

--------------------------------------

Magnolia®  - Simple Open-Source Content Management





----------------------------------------------------------------
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