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

Key: CACHE-278
Type: Bug Bug
Status: Closed Closed
Resolution: Incomplete
Priority: Major Major
Assignee: Lars Torunski
Reporter: Kevin Kilmer-Choi
Votes: 0
Watchers: 1
Operations

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

Filter ignores max-age parameter when serving from cache

Created: 13/Feb/07 10:50 AM   Updated: 13/Jun/07 03:47 PM
Component/s: Filters
Affects Version/s: 2.3.2
Fix Version/s: 2.4

Environment: WinXP, Resin 3.0.22
Issue Links:
Related
This issue relates to:
CACHE-297 max-age parameter not set on Response... Major Closed
This issue is related to:
CACHE-297 max-age parameter not set on Response... Major Closed


 Description  « Hide
I am testing the CacheFilter with the following parameter:

<init-param>
        <param-name>max-age</param-name>
        <param-value>no init</param-value>
    </init-param>

It seems to properly omit the max-age cache control header on the first page request (when the content is initially built), but on subsequent requests (when the content is served from cache) the max-age header is set to 60.

Here are the request and response headers from my test case, two requests for the same page, two seconds apart:

******* FIRST REQUEST ********
GET /proxy_cache_test.jsp?h=1 HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: current.us.localhost:8080
Connection: Keep-Alive

******* FIRST RESPONSE ********
HTTP/1.1 200 OK
Server: Resin/3.0.22
X-Wescom-Server: WSIN070
Content-Type: text/html
Transfer-Encoding: chunked
Date: Tue, 13 Feb 2007 16:13:36 GMT

******* SECOND REQUEST ********
GET /proxy_cache_test.jsp?h=1 HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: current.us.localhost:8080
Connection: Keep-Alive

******* SECOND RESPONSE ********
HTTP/1.1 200 OK
Server: Resin/3.0.22
X-Wescom-Server: WSIN070
Cache-Control: max-age=60
Content-Type: text/html
Content-Length: 862
Date: Tue, 13 Feb 2007 16:13:38 GMT

This appears to be a bug.

 All   Comments   Change History      Sort Order:
Lars Torunski - [17/Feb/07 04:57 AM ]
The first response is strange, because the Last-Modified header is missing. Can you provide you full web.xml?

Lars Torunski - [14/Apr/07 01:33 AM ]
Kevin,

please provide me your web.xml to look deeper into the problem.

Do you use the CacheFilter to cache e.g. Struts pages? see http://forums.opensymphony.com/thread.jspa?threadID=71804

Maybe you can try the current dev version: http://ivyrep.opensymphony.com/opensymphony/oscache/
oscache-2.4-dev-20070401061543.jar

Lars Torunski - [13/Jun/07 03:45 PM ]
this issue is fixed with OSCache 2.4.1, see CACHE-297

The fix is available via http://ivyrep.opensymphony.com/opensymphony/oscache/

Lars Torunski - [13/Jun/07 03:47 PM ]
This bug is resolved with release 2.4.1.