Hi Marvin and Jan,
Just wanted to chime in on this one. We recently had the need to exclude
content from the browser cache. We initially tried this by adding a
configuration node under browserCachePolicy/policies with an URIStartsWithVoter
to exclude browser caching for URIs that start with the given pattern.
Unfortunately, that didn’t seem to work. The response headers did not include
the ‘no-cache’ header.
Searching through the magnolia source code, we came across
info.magnolia.module.cache.filter.CacheHeadersFilter that included a sample
configuration for headers-nocache within the javadoc comment. Implementing this
worked.
Here’s an example of what we did for the headers-nocache filter configuration:
+ server
+ filters
+ ...
+ headers-nocache
+ bypasses
+ urls
- class
info.magnolia.voting.voters.URIStartsWithVoter
- not true
- pattern /some-uri
- class info.magnolia.module.cache.filter.CacheHeadersFilter
- nocache true
A couple questions I have regarding this are:
1. Are there any side effects of using this method instead of configuring
this behavior through the browserCachePolicy?
2. I’m still curious about why adding the configuration to the
browserCachePolicy didn’t seem to work. Jan, could you provide a sample
configuration to accomplish this through the browserCachePolicy config?
Cheers,
Matt
________________________________
From: Jan Haderka <[email protected]>
Reply-To: Magnolia User-List <[email protected]>
Date: Tue, 10 May 2011 09:08:00 +0200
To: Magnolia User-List <[email protected]>
Subject: Re: AW: [magnolia-user] Cache Deny URL
Hi Marvin,
could you please describe what exactly you did following Rakesh's suggestion
and why do you think it doesn't work (i.e. what is the expected effect you are
not seeing)?
Copying the "dotMagnolia" under the "deny" list and changing pattern to
"/contact.html" should indeed exclude such content from Magnolia cache.
Since you mention "no-cache" I think that maybe you want to exclude content
from browser cache instead of from Magnolia cache, is that correct or did you
really meant excluding content from Magnolia's cache?
Thanks,
Jan
On May 10, 2011, at 8:50 AM, Marvin Kerkhoff wrote:
Hi Rakesh
Thanks for that, but it’s doesn’t work for me. Magnolia work with the caching
version. I have also add a pseydo query to the site, but no effect.
Cheers
Marvin
________________________________
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Rakesh Vidyadharan
Gesendet: Montag, 9. Mai 2011 17:49
An: Magnolia User-List
Betreff: Re: [magnolia-user] Cache Deny URL
Hi there,
I have some simple question how I config URL to the cache deny list. We would
like to “no-cache” the site /contact.html. How it should be done?
Thanks
Marvin
Copy
Configuration->Cache->cache/config/configurations/default/cachePolicy/voters/urls/excludes/dotMagnolia
to the parent node and then change as appropriate.
Rakesh
________________________________
----------------------------------------------------------------
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
Register now for Magnolia Conference 2011:
http://www.magnolia-cms.com/conference
--------------------------------------
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]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------