> I wrote a nice little redirect mechanism which checks in the page properties 
> for a flag and redirects to the SAME PAGE via https or back. This works all 
> fine except that the cache seems to ignore the protocol but only look at the 
> path (don't know about the server name since both http and https are running 
> under the same server name). 
> 
> Now when the user calls page X via http, but the page is set to be served via 
> https the redirect mechanism kicks in and redirects to https. This gets 
> stored in the cache... but apparently only under the path. So when the same 
> page is called again (via https this time) instead of serving the page the 
> cache will server the redirect again -> endless redirects!
All headers are part of the cache entry, this includes the redirect status.

> Can anyone confirm that the cache is actually ignoring the protocol?
True I can confirm that. I am not sure if we want to change that generally but 
you can have your custom implementation of 
CachePolicy.retrieveCacheKey(AggregationState).

The cache policy is configured in the cache module config/ 

> What about the server name?
Is part of the key, as well the locale

> One way to solve this problem would be to implement this redirect mechanism 
> not in the page itself, but rather as a filter as Frank Sommer suggests [1], 
> and then place this redirect filter BEFORE the cache filter. This is the 
> cleaner approach anyway. Do you see any reason why this would not work?
> 
> Thanks!
> 
> -will
> 
> P.S.: Contrats to Magnolia for winning the Swiss Open Source Award!!!
> 
> 
> [1] 
> http://wiki.magnolia-cms.com/display/WIKI/Filter+for+redirect+between+HTTP+and+HTTPS
> 
> 
> ----------------------------------------------------------------
> 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]>
----------------------------------------------------------------

Reply via email to