I am trying to set the cachability of an ASP.NET resource. Therefore, if I goto / foo / show, it will show View for some resource and close it for several hours (for example). To do this, I use the OutputCache attribute, which decorates my action method. Details of this cache (against this action method) are in the web.config file.
When I set this output cache, it sets the maxage value .. correctly, but the s-maxage value is 0. WTF?
here is the code ...
[Authorize] [OutputCache(CacheProfile = "SomeController_Show")] public ActionResult Show(){ ... }
and here is a fragment of the configuration file.
<add name="SomeController_Show" duration="3600" varyByParam="authkey;format;blah" />
and a fragment of the answer ...
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 maxage is installed correctly, but s-maxage is NOT? can someone help me here?
caching asp.net-mvc outputcache
Pure.Krome
source share