Created
July 5, 2012 14:11
-
-
Save RobGibbens/3053901 to your computer and use it in GitHub Desktop.
Revisions
-
RobGibbens created this gist
Jul 5, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ public ActionResult Index() { var repo = new Repository(); var dto = repo.GetDtoById(1); // Note, this doesn't know about the cache at all } public class Repository() { [Cache(Duration = 10)] public DTO GetDtoById(int id) { // if it gets here, go get data from database, note this doesn't know about the cache at all } }