0

I have a portal that pulls data from a data source which is updated every day at 1am. So I want to set the expiration on the ajax calls that request the data from my asp.net mvc controller to expire at 2 am.

How do I set a specific date/time for expiration on the controller that is called by the ajax function?

richard
  • 12,263
  • 23
  • 95
  • 151
  • 3
    What about using the `HttpCachePolicy.SetExpires` method: `Response.Cache.SetExpires(DateTime.Parse("2:00:00AM"));`? – nemesv Mar 05 '14 at 21:17
  • See this question: https://stackoverflow.com/questions/9234044/asp-net-mvc-and-ie-caching-manipulating-response-headers-ineffective – Rob Kent Mar 05 '14 at 21:37
  • Ok I set that, but for some reason it is being ignored. IO also set Cache-Control and it is also being ignored. The headers I am getting back are Cache-Control: private and the expires is a date/time that isn't what I specified. – richard Mar 05 '14 at 22:32

0 Answers0