Right, from WebResource class...
protected void setHeaders(WebResponse response)
{
if (isCacheable())
{
// If time is set also set cache headers.
response.setDateHeader("Expires", System.
currentTimeMillis() +
(getCacheDuration() * 1000L));
response.setHeader("Cache-Control", "max-age=" +
getCacheDuration());
}
else
{
response.setHeader("Cache-Control", "no-cache,
must-revalidate");
}
}
From: Martin Grigorov <[email protected]>
To: [email protected]
Date: 11/18/2010 08:59 AM
Subject: Re: Non-caching RenderedDynamicImageResource
On Thu, Nov 18, 2010 at 2:33 PM, <[email protected]> wrote:
> Right, good to know, was just providing the objects, assumed
> implementation of render to be irrelevant, but I guess not entirely.
> Anyway, I'm also interested in the second part of your question, what
does
> resource.setCacheable(false) effect, I've had trouble tracking this down
> in the resource classes...
It means "add response headers to tell the browser and public proxies to
not
cache this resource".
About Image+Ajax re-paint:
https://issues.apache.org/jira/browse/WICKET-1382
<https://issues.apache.org/jira/browse/WICKET-1382>Does this help in this
case ? I don't have time right now to look at the code and I have no
experience with this resource.
>
>
>
> From: Carl-Eric Menzel <[email protected]>
> To: [email protected]
> Date: 11/18/2010 08:26 AM
> Subject: Re: Non-caching RenderedDynamicImageResource
>
>
>
> On Thu, 18 Nov 2010 08:13:57 -0500
> [email protected] wrote:
>
> > Haven't tested this, but it could be a start...
> >
> > final RenderedDynamicImageResource rd = new
> > RenderedDynamicImageResource(100, 100) {
> >
> > @Override
> > protected boolean render(Graphics2D graphics)
> > { return false;
> > }
>
> That was my idea before I came up with my NonCaching...Resource.
> However, the return value of render(Graphics2D) is used to indicate the
> requirement to immediately re-render due to a change in image
> dimensions. Simply returning false would throw render() into an infinite
> loop:
>
> [RenderedDynamicImageResource]
> protected byte[] render()
> {
> while (true)
> {
> final BufferedImage image = new
> BufferedImage(getWidth(), getHeight(), getType());
> if (render((Graphics2D)image.getGraphics())) {
> return toImageData(image);
> }
> }
> }
>
> Carl-Eric
> www.wicketbuch.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
>
>
>
> Notice: This communication, including any attachments, is intended
solely
> for the use of the individual or entity to which it is addressed. This
> communication may contain information that is protected from disclosure
> under State and/or Federal law. Please notify the sender immediately if
> you have received this communication in error and delete this email from
> your system. If you are not the intended recipient, you are requested
not
> to disclose, copy, distribute or take any action in reliance on the
> contents of this information.
>
Notice: This communication, including any attachments, is intended solely
for the use of the individual or entity to which it is addressed. This
communication may contain information that is protected from disclosure
under State and/or Federal law. Please notify the sender immediately if
you have received this communication in error and delete this email from
your system. If you are not the intended recipient, you are requested not
to disclose, copy, distribute or take any action in reliance on the
contents of this information.