Hi folks,
I'm trying to set the cachability of an ASP.NET resource. So if I goto /foo/show it will show a View for some resource, and cache this for a few hours (for example). To do this, I'm using the OutputCache attribute which decorates my Action Method. The details of this cache (against this action method) are found in the web.config file.
When I set this Output Cache, it's correctly setting the maxage value
.. but the s-maxage
value is 0. WTF?
here's the code...
[Authorize]
[OutputCache(CacheProfile = "SomeController_Show")]
public ActionResult Show(){ ... }
and here's a snippet of the config file..
<add name="SomeController_Show" duration="3600" varyByParam="authkey;format;blah" />
and a snippet of the response...
Cache-Control:public, max-age=3576, **s-maxage=0**
Content-Length:746
Content-Type:application/json; charset=utf-8
Date:Tue, 10 Aug 2010 00:42:17 GMT
Expires:Tue, 10 Aug 2010 01:41:53 GMT
Last-Modified:Tue, 10 Aug 2010 00:41:53 GMT
Server:Microsoft-IIS/7.0
Vary:*
Notice how the maxage is correctly set but the s-maxage is NOT? can someone help me out, here?