In ASP.NET MVC, if I don’t put a [Duration=x, VaryByParam="None"] attribute on my partial view, or if I put it with Duration=0, I sometimes get the error “Duration must be a positive number”. I have read many posts on this topic, and they all seem to say that including the attribute with a non-zero duration is the only way to avoid that error.
But I do NOT want the data cached at all (not even for 1 second), and it seems to me that setting a non-zero cache duration would almost by definition be enabling caching (for whatever length of time I specify for the Duration).
All the posts I’ve read seem to ignore that, and talk about setting an attribute with a Duration as the way to avoid caching, but that doesn’t make any sense to me. How can I completely avoid caching on a particular partial view? Also, is there a way to disable caching across my entire ASP.NET MVC application?
Thanks all for your input. The comments about the issue being client-side were helpful. In the end, it turned out the issue was due to ajax caching being enabled by default in Internet Explorer. The solution was to disable that caching with a JQuery call as follows: