I have an ASP.Net MVC 3 web application that I use to deliver files (in this particular test, in pdf files). Files will not change (if the file changes, a new URL will be created). Therefore, I would like to set the maximum age (for Cache-Control) to 31536000 (1 year).
the code...
Response.Cache.SetMaxAge(TimeSpan.FromDays(365));
Fiddler's answer ...
Cache-Control: private, max-age=7200
However, if I set the maximum age to less than 7200, it works just fine ...
the code...
Response.Cache.SetMaxAge(TimeSpan.FromSeconds(7199));
Fiddler's answer ...
Cache-Control: private, max-age=7199
I tried to set the [OutputCache] attribute for this action with the same results.
Any idea that 7200 follows, and how to let it be bigger?
Brian source
share