Hi Jan,

Ok, so I tried to configure the browserCachePolicy again.  Moving the voter to:
[code]
config:/modules/cache/config/configurations/default/browserCachePolicy/policies/dontCachePages/voters
[/code]

Here's what I've got:
[code]
+ browserCachePolicy
    + policies
        + ...
        + dontCachePages
            + contentType
                + allowed
                    - html     text/html
                - class        
info.magnolia.voting.voters.ResponseContentTypeVoter
            + urls
                - class        info.magnolia.voting.voters.URIStartsWithVoter
                - not           true
                - pattern    /some-uri
            - op                OR
            - class            
info.magnolia.module.cache.browsercachepolicy.Never
[/code]

Unfortunately, this doesn't seem to do the trick.  The response header still 
doesn't include 'no-cache'.  Although, the status code is set to 200 and not 
304, which is good, but it's no different than what I was getting before adding 
the [code]urls[/code] config node to [code]dontCachePages[/code], since the 
[code]contentType[/code] voter already seems to be handling that.

Here's what I'm seeing for the response header:

[code]
Server: Apache-Coyote/1.1
X-Magnolia-Registration: Registered
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Type: text/html;charset=UTF-8
Content-Length: 4464
Date: Fri, 13 May 2011 15:35:21 GMT

200 OK
[/code]

What I need the response header to be is:

[code]
Date: Fri, 13 May 2011 15:40:14 GMT
Server: Apache-Coyote/1.1
X-Magnolia-Registration: Registered
Vary: Accept-Encoding,User-Agent
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Encoding: gzip
Last-Modified: Fri, 13 May 2011 15:00:22 GMT
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Pragma: no-cache
Content-Length: 7935
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html;charset=UTF-8

200 OK
[/code]

It appears to be something happening in our server-side 
[code]cachePolicy[/code] that is causing this to happen.  In our 
[code]cachePolicy[/code] we have something similar to following config:
[code]
+ cachePolicy
    + voters
        + urls
            + includes
                + all
                    - class        
info.magnolia.voting.voters.URIStartsWithVoter
                    - pattern    /
             + excludes
                 + dotMagnolia
                     - class       
info.magnolia.voting.voters.URIStartsWithVoter
                     - pattern   /.magnolia
                  + someURI
                      - class       
info.magnolia.voting.voters.URIStartsWithVoter
                      - pattern   /some-uri
                  - not              true
             - level                1
        + deny
        + resources
    - class                                             
info.magnolia.module.cache.cachepolicy.Default
    - refreshOnNoCacheRequests    false
[/code]

If I remove the [code]someURI[/code] node from the list of [code]urls[/code] 
under the [code]excludes[/code] node then I get the [code]no-cache[/code] 
response header.

Any ideas what could be happening?

Cheers,
Matt

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=3c75b823-2ab7-46ea-84aa-092f225be930


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