File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed
DevTrends.MvcDonutCaching.Demo Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,10 @@ public class HomeController : Controller
1010 {
1111 //
1212 // GET: /Home/
13+ [ DonutOutputCache ( Duration = 24 * 3600 ) ]
1314 public ActionResult Index ( )
1415 {
15- return View ( ) ;
16+ return View ( DateTime . Now ) ;
1617 }
1718 }
1819}
Original file line number Diff line number Diff line change 1- @{
2- ViewBag .Title = " title" ;
1+ @model DateTime
2+ @{
3+ ViewBag .Title = " Welcome to MvcDonutCaching demo" ;
34}
45
56<h2 >@ViewBag.Title </h2 >
7+
8+ <p >
9+ This page has been rendered at @Model
10+ </p >
Original file line number Diff line number Diff line change 5656
5757 <runtime >
5858 <assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" >
59+ <!--
60+ System.Web Assembly redirects are needed by MvcDonutCaching with MVC 4 (The library is linked against System.Web.Mvc 3.0)
61+ Without that, DonutCacheAttribute will be ignored.
62+ -->
63+ <dependentAssembly >
64+ <assemblyIdentity name =" System.Web.Helpers" publicKeyToken =" 31bf3856ad364e35" />
65+ <bindingRedirect oldVersion =" 1.0.0.0-2.0.0.0" newVersion =" 2.0.0.0" />
66+ </dependentAssembly >
67+ <dependentAssembly >
68+ <assemblyIdentity name =" System.Web.Mvc" publicKeyToken =" 31bf3856ad364e35" />
69+ <bindingRedirect oldVersion =" 1.0.0.0-4.0.0.0" newVersion =" 4.0.0.0" />
70+ </dependentAssembly >
71+ <dependentAssembly >
72+ <assemblyIdentity name =" System.Web.WebPages" publicKeyToken =" 31bf3856ad364e35" />
73+ <bindingRedirect oldVersion =" 1.0.0.0-2.0.0.0" newVersion =" 2.0.0.0" />
74+ </dependentAssembly >
75+ <!-- Added by Autofac -->
5976 <dependentAssembly >
6077 <assemblyIdentity name =" Autofac" publicKeyToken =" 17863af14b0044da" culture =" neutral" />
6178 <bindingRedirect oldVersion =" 0.0.0.0-3.0.0.0" newVersion =" 3.0.0.0" />
You can’t perform that action at this time.
0 commit comments