2

I am using MVC and OutputCache attribute for client side caching.

When I set OutputCache Location to Client what I expect to see is on the second and continues requests, action shouldn't be hit. OutputCache needs to send 302 response code if the time not exceed. But on the real this isn't happen, when i refresh the page action is runnning. why outputCache doesn't send 302 response code and prevent action to be run.

   [OutputCache(Location=OutputCacheLocation.Client,Duration=60)]
    public ActionResult Text()
    {
        return Content("text");
    }
Yucel
  • 2,603
  • 5
  • 28
  • 40
  • How are you refreshing? Are you by some chance hitting `Ctrl+F5` in your browser? – Darin Dimitrov Feb 25 '13 at 09:52
  • check this post http://stackoverflow.com/questions/9592284/outputcache-location-client-does-not-appear-to-work – K D Feb 25 '13 at 10:06
  • Yes I am also try with ctrl+f5, I know that browser will request file from server but server need to response 304 because of outputcache am I false – Yucel Feb 25 '13 at 14:38

0 Answers0