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

Reply via email to