It sounds like you are using an action to render the image. What I did was
had my image rendered by page instead of the component. The component just
puts the img element into the page.

consider using expires instead or/in addition to cache-control

in your StreamResponse.

                public void prepareResponse(Response response) {
                    Calendar c = Calendar.getInstance();
                    c.add(Calendar.MONTH, 1);
                    response.setDateHeader("Expires", c.getTimeInMillis());
                }

Josh
On Fri, Jul 18, 2008 at 1:53 PM, ronaldlee <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> In my StreamResponse class I set the header like this:
>
> arg0.setHeader("Cache-Control", "max-age=3600, must-revalidate");
>
> I created a component responsible to render this StreamResponse, and this
> component is being used in multiple pages. It appears that even though the
> function in my component returns the same image, the image is not cached
> because the URL created also includes the "page" name at the beginning,
> which makes the URL different from page to page even it is requesting the
> same image.
>
> Any idea how this can be solved??
>
> thx!
> Ronald
> --
> View this message in context:
> http://www.nabble.com/T5%3A-cache-image-created-by-StreamResponse--tp18537525p18537525.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to