Hi Jan,

Yes to both questions :)
To find those answers, just checked the demo-author (4.4.6), which has indeed a 
policies/voter config for browsercaching that is not in my 4.4.2 installation.
(but it may have been deleted)
Did anything change between 4.4.2 and 4.4.6, or can I just copy this policies 
subtree and adapt the voters accordingly?

cheers, Kees

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jan Haderka
Sent: Friday, March 02, 2012 8:22 AM
To: Magnolia User-List
Subject: Re: [magnolia-user] excluding URIs from browserCache


On Mar 1, 2012, at 2:23 PM, Kees de Koning wrote:


Hi,

I need to be able to exclude certain URIs from being browser cached (ie, 
getting cache headers set for most URIs but not all).
Looking briefly at the cache configuration for browserCachePolicy, using 
info.magnolia.module.cache.browsercachepolicy.FixedDuration I figured
I could add voters to exclude the URIs needed.  After all, FixedDuration 
extends AbstractVoterBased, which defines and implements canCacheOnClient which
looks at the voters to define whether to cache or not.
Tried, didn't work, looked at the code again, ad FixedDuration actually doesn't 
call canCacheOnClient at all....

isn't that a bug? If you extend a class called AbstractVoterBased, you're 
expected to look at voters I'd say?

It would be a bug indeed. However I would first check your configuration. Code 
seems OK.

SetExpirationHeaders executor calls correctly 
CacheConfiguration.getBrowserCachePolicy and  BrowserCachePolicySet (assuming 
you didn't change default config) calls  canCacheOnClient() on each of its 
delegates.

So questions are:
- do you have SetExpirationHeaders executor set in the cache configuration?
- do you use default BrowserCachePolicySet as the top most browser cache policy?

HTH,
Jan


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


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

Reply via email to