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 } }