as far as i can see this is the default behavior for DynamicImageResource
so you don't need it ,other wise call disableCaching() ,
i don't remember 1.4 now but you can have your isNotCachable() ,it's very
simple check if getCacheduration is none/zero else there is
boolean dataNeedsToBeWritten(attributes)


On Wed, Apr 24, 2013 at 9:24 PM, smallufo <[email protected]> wrote:

> Hi :
> I wonder how to set header of DynamicImageResource ?
> In 1.4 , it just override setHeaders(WebResponse response)
> {
>   response.setHeader("Cache-Control" , "no-cache");
> }
>
> But , how to do this in 6.7 ?
>
> If I override setResponseHeaders(ResourceResponse data , Attributes
> attributes) ,
> It seems there are two ways to setHeader :
>
> data.getHeaders().addHeader("Cache-Control", "no-cache");
> and
> ((WebResponse) attributes.getResponse()).addHeader("Cache-Control" ,
> "no-cache");
>
> Which is correct ?
>
> And...
> in 1.4 , there is an "isCacheable()" method , where is it in 6.7 ?
>
> Thanks .
>



-- 
regards,

Vineet Semwal

Reply via email to