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

Key: CACHE-292
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Lars Torunski
Reporter: Lars Torunski
Votes: 0
Watchers: 0
Operations

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

CacheFilter max-age default and error-case initialisation are wrong

Created: 14/Apr/07 01:22 AM   Updated: 14/Apr/07 01:24 AM
Component/s: Filters
Affects Version/s: 2.3.2
Fix Version/s: 2.4


 Description  « Hide
Taken from http://forums.opensymphony.com/thread.jspa?threadID=77073&messageID=141588#141588

I've just found a couple of snags in this area. We're using OSCache 2.3.1 by the way. I've noticed that although the documentation says that the default for the max-age parameter is 60, the log message in CacheFilter.init() (line 349) says that oscache is defaulting to 'time' which isn't the case - it does actually default to 60 seconds as per the docs.

Also, while looking at this code I noticed that if a negative integer is specified as the parameter value, not only is the separate log message wrong here, saying it's defaulting to 'time' when it isn't, but the cacheControlMaxAge field is specifically set to 60 when it should be set to -60 because of the strange sign-reversal that happens in the CacheHttpServletResponseWrapper constructor when using the value. This would result in max-age values of -60 being sent to the browser.

 All   Comments   Change History      Sort Order:
Lars Torunski - [14/Apr/07 01:24 AM ]
The strange sign-reversal still exists in 2.4, but the initialization issues are fixed in 2.4.