cache and RenderActionhttp://forums.asp.net/t/1588407.aspx/1?cache+and+RenderActionTue, 10 Aug 2010 04:58:50 -040015884074018456http://forums.asp.net/p/1588407/4018456.aspx/1?cache+and+RenderActioncache and RenderAction <p>Hello.</p> <p>I am using asp.net mvc 2 and IIS 7.5<br> </p> <p>I have problems with caching results of controllers methods which return partial view. Web server doesn't cache this results.</p> <p>&lt;%Html.RenderAction(&quot;TownsList&quot;, &quot;Towns&quot;); %&gt;</p> <p>..........<br> </p> <p>[OutputCache(Duration = 10000, VaryByParam = &quot;None&quot;)]<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public ViewResult TownsList()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var towns = adsRepository.Towns.OrderByDescending(x =&gt; x.Ads.Count()).Take(6).OrderBy(x =&gt; x.Name);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return View(towns.ToList());<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p>I check&nbsp; cache state&nbsp; using the following line of code: &lt;%= DateTime.Now.ToLongTimeString() %&gt;</p> <p>Please, help me to solve this problem.<br> </p> <p><br> </p> 2010-08-10T03:24:05-04:004018592http://forums.asp.net/p/1588407/4018592.aspx/1?Re+cache+and+RenderActionRe: cache and RenderAction <p>http://forums.asp.net/t/1559041.aspx</p> 2010-08-10T04:58:50-04:00