Re: Caching page results ...

2012-02-26 Thread Gunnar Eketrapp
Ok here is my solution ... In my app module I added .. public void contributeComponentEventResultProcessor(final Response response, MappedConfiguration, ComponentEventResultProcessor> configuration) { configuration.add(HttpErrorNotModified.class, new ComponentEventResultProcessor() { public void

Re: Caching page results ...

2012-02-26 Thread Gunnar Eketrapp
I just saw that ResourceStreamerImpl.java checks modification time and does ... response.sendError(HttpServletResponse.SC_NOT_MODIFIED, ""); Is there a way for me to achieve the same from my onActivate() method below ... I.e. how do I return a 304 when my image hasn't been changed according t

Re: Caching page results ...

2012-02-25 Thread Howard Lewis Ship
Do the images ever change? If not, you can use the same kind of approach Tapestry uses for assets: incorporate a version number (or SHA1 checksum) into the path, and set the headers that ensure caching on the client (I'd have to check the Tapestry code for the exact ones that work). On Sat, Feb 2

Caching page results ...

2012-02-25 Thread Gunnar Eketrapp
Hi! I currently store uploaded files in the db. I then retrieve those images with via an Image page. My problem now is that the client does not cache these images. Is there an easy way to fix my erreneous solution !? public void prepareResponse(Response r) { r.setHeader("Cache