History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-185
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Lars Torunski
Reporter: Simone Avogadro
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OSCache

Filtered requests will be re-requested twice

Created: 06/Jul/05 09:27 AM   Updated: 06/Nov/05 11:19 AM
Component/s: Filters
Affects Version/s: 2.1.1
Fix Version/s: 2.2 RC

Flags: Patch


 Description  « Hide
When filtering requests and going thru the 302 NOT_MODIFIED response process the cache will currentlyy have to serve the same response twice before the client begins to cache it.
This happens because dynamic pages (e.g. JSP's) will set cache control to private, so the first request (which is served transparently while being cached) won't be cached from the client (even if OS-cache is actually caching it!)
to improve this we added the following lines of code to the filter servlet:
(just the line before setting the "Last-Modified" header):

((HttpServletResponse)response).setHeader("Cache-Control","public");


 All   Comments   Change History      Sort Order:
Lars Torunski - [06/Jul/05 04:12 PM ]
This isn't an improvement, it's a bug. The last modified header isn't send to the client by the first request.

Lars Torunski - [06/Jul/05 04:18 PM ]
This has been fixed due to the changes for CACHE-169. The classes CacheHttpServletResponseWrapper and ResponseContent have been changed to fix this issue.