[xwiki-devs] [xwiki-users] outputting cache-related headers from XWiki

Sergiu Dumitriu sergiu at xwiki.com
Mon Mar 14 19:50:40 UTC 2011


On 03/14/2011 06:23 PM, Paul Libbrecht wrote:
> (moving to devs since it's an internal issue): the method XWikiServletResponse.setHeader was calling addHeader.
>
> http://jira.xwiki.org/jira/browse/XWIKI-6106 is opened.
> (it concerns the trunk as well).

Fixed for 3.0RC1 and 2.7.2.

> Since I applied this fix on my development machine, I can set a cache-header!
>
> paul
>
>
> Le 14 mars 2011 à 14:47, Paul Libbrecht a écrit :
>> as I am slowly realizing, there's no way to prevent the output of the following headers which basically say that no client or proxy caching should be done.
>> I agree that the default policy should be to not cache but it should be possible to allow to cache.
>>
>> Even changing the header values with:
>> 	$response.setHeader("Cache-Control","max-age=60, public")
>> fails because it adds no-cache to the front.
>>
>> $reponse.setDateHeader("Expires",someDate) seems to work.
>>
>> This is quite odd I have to say.
>> Should I hunt somewhere else?
>> I fear I need to dig into the servlets.


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/



More information about the devs mailing list