On my controller
[OutputCache(Duration = 60, Location = OutputCacheLocation.Any)]
I have this attribute. In my view I have
<div id="hot-topics-replacement" url="@Url.Action("IndexPartial", "Topics")"></div>
And this is JQuery code
var url = $("#hot-topics-replacement").attr("url");
$("#hot-topics-replacement").load(url, function () { ResizeHotTopics(); });
It always makes a request to server. I was expecting at least it caches to browser (I am testing on Chrome) but it doesn't do it.
I don't know where is my mistake.
EDIT SOLVED
When I check Response Headers, I observed that between last modified date and expiration date there is just 10 seconds instead of 60. Now I made the Cache Duration
200 seconds and it works.
As far as I understood, there is something fishy about date times between server and client.