You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tim Dudgeon <td...@gmail.com> on 2019/03/19 09:29:54 UTC
Disable cache for AbstractResource
I'm struggling with disabling the browser cache when using
org.apache.wicket.request.resource.AbstractResource.
In my subclass I have this:
@Override
protected void configureCache(ResourceResponse data, Attributes
attributes) {
super.configureCache(data, attributes);
data.disableCaching();
}
When when the resource is requested the response headers contain this,
so seems that the caching is not being disabled:
cache-control: private
cache-control: max-age=31536000
content-disposition: attachment; filename="results.json"
date: Tue, 19 Mar 2019 09:15:36 GMT
expires: Wed, 18 Mar 2020 09:15:36 GMT
pragma: cache
Am I going about this the wrong way?
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Disable cache for AbstractResource
Posted by sven <sv...@meiers.net>.
You have to flip those two lines:
data.disableCaching();
super.configureCache(data, attributes);
Sven
>
> On 19.03.2019 at 10:29, <Tim Dudgeon> wrote:
>
>
> I'm struggling with disabling the browser cache when using org.apache.wicket.request.resource.AbstractResource. In my subclass I have this: @Override protected void configureCache(ResourceResponse data, Attributes attributes) { super.configureCache(data, attributes); data.disableCaching(); } When when the resource is requested the response headers contain this, so seems that the caching is not being disabled: cache-control: private cache-control: max-age=31536000 content-disposition: attachment; filename="results.json" date: Tue, 19 Mar 2019 09:15:36 GMT expires: Wed, 18 Mar 2020 09:15:36 GMT pragma: cache Am I going about this the wrong way? Tim --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org
>