Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Aug 10, 2010 03:24 AM|LINK
I am using asp.net mvc 2 and IIS 7.5
I have problems with caching results of controllers methods which return partial view. Web server doesn't cache this results.
<%Html.RenderAction("TownsList", "Towns"); %>
[OutputCache(Duration = 10000, VaryByParam = "None")]
public ViewResult TownsList()
var towns = adsRepository.Towns.OrderByDescending(x => x.Ads.Count()).Take(6).OrderBy(x => x.Name);
I check cache state using the following line of code: <%= DateTime.Now.ToLongTimeString() %>
Please, help me to solve this problem.