You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Boris Goldowsky <bg...@cast.org> on 2008/08/19 18:13:06 UTC
Question on resource caching
Hi,
I have some pages that reference images that are in files external to
the web application and I am serving the images via SharedResources like
so:
public class ExternalImageResource extends WebResource {
...
public IResourceStream getResourceStream() {
return new FileResourceStream(file);
}
Note I am never adding these as components to wicket pages -- I just
have HTML that refers to the known shared-resource URLs.
I am puzzled by the fact that if an image is updated on the file system,
the application does not seem to notice this - I get the old version of
the image until the application is shut down and restarted. It's not
browser or network caching; shift-reload doesn't help.
Am I doing something wrong, or do I need to write my own code to check
the file system periodically for updates?
Thanks
Boris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Question on resource caching
Posted by Johan Compagner <jc...@gmail.com>.
Shared resources do set some cache headers. But a forced reload should
do a new get. Is the getResourceStream() method hit in such a case?
On 8/19/08, Boris Goldowsky <bg...@cast.org> wrote:
> Hi,
>
> I have some pages that reference images that are in files external to
> the web application and I am serving the images via SharedResources like
> so:
>
> public class ExternalImageResource extends WebResource {
> ...
> public IResourceStream getResourceStream() {
> return new FileResourceStream(file);
> }
>
> Note I am never adding these as components to wicket pages -- I just
> have HTML that refers to the known shared-resource URLs.
>
> I am puzzled by the fact that if an image is updated on the file system,
> the application does not seem to notice this - I get the old version of
> the image until the application is shut down and restarted. It's not
> browser or network caching; shift-reload doesn't help.
>
> Am I doing something wrong, or do I need to write my own code to check
> the file system periodically for updates?
>
> Thanks
>
> Boris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org