Mantis - Resin
Viewing Issue Advanced Details
144 minor always 05-06-05 00:00 05-11-05 00:00
closed 3.0.12  
3.0.12 no change required  
0000144: <cache-mapping> doesnt appear to work
Placed these lines in resin.conf under <web-app id='/'>

  <cache-mapping url-pattern='/*'
  <cache-mapping url-pattern='*.gif'
  <cache-mapping url-pattern='test.jsp'

Placed a proxy sniffer (devproxy) between the browser and the server to look at the response. When requesting things that match the url-pattern, for example "/foo.gif", I do not see an expires tag. I created a test.jsp and manually set the expires tag in the response to confirm I see that (I do).

Also, it is unclear from the documentation if Resin Open Source will respect the cache-mapping directives or if that falls in the category of Resin-pro only features.

winxp, resin-pro-3.0.12 with 60 day dev license. jdk1.5.0_02

05-06-05 00:00   
Updated the documentation.

1. cache-mapping only works when <cache> is enabled. Otherwise it is ignored.

2. cache-mapping only works with cacheable pages with no Expires time, i.e. pages that have an ETag or Last-Modified.

If a page is not marked as cacheable (e.g. in a JSP that doesn't set headers), the cache-mapping does not apply.