Donut Caching MVC
Hej Eksperter..Jeg sidder og prøver at cache i MVC :)
Jeg har kigget på Phil Haacks blog her:
http://haacked.com/archive/2008/11/05/donut-caching-in-asp.net-mvc.aspx
Men jeg sys ikke rigtig jeg kan se at det virker.
Min controller:
[OutputCache(Duration = 60, VaryByParam = "None")]
public ActionResult List()
{
var clients = dc.Clients.ToList();
return View(clients);
}
Nu besøger jeg siden:
http://localhost:2583/Client/List
Firebug:
Server ASP.NET Development Server/10.0.0.0
Date Tue, 10 Aug 2010 22:44:06 GMT
X-AspNet-Version 4.0.30319
X-AspNetMvc-Version 2.0
Cache-Control public, max-age=47
Expires Tue, 10 Aug 2010 22:44:53 GMT
Last-Modified Tue, 10 Aug 2010 22:43:53 GMT
Vary *
Content-Type text/html; charset=utf-8
Content-Length 1336219
Connection Close
Response-headereview source
Server ASP.NET Development Server/10.0.0.0
Date Tue, 10 Aug 2010 22:44:33 GMT
X-AspNet-Version 4.0.30319
X-AspNetMvc-Version 2.0
Cache-Control public, max-age=20
Expires Tue, 10 Aug 2010 22:44:53 GMT
Last-Modified Tue, 10 Aug 2010 22:43:53 GMT
Vary *
Content-Type text/html; charset=utf-8
Content-Length 1336219
Connection Close
Request-headereview source
Host localhost:2583
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; da; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language da,en-us;q=0.7,en;q=0.3
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Connection keep-alive
Som i kan se så ser det altså ud til den hiver hele pivtøjet ud igen..
Kan i hjælpe mig her? :$