Хорошо внутри действия контроллера, которое вызывает метод в вашем репозитории, который должен запрашивать базу данных, вы можете проверить, содержит ли кэш уже результаты.
Вот обычно используемый шаблон:
public ActionResult Foo()
{
// Try fetching the results from the cache
var results = HttpContext.Cache["results"] as IEnumerable<MyViewModel>;
if (results == null)
{
// the results were not found in the cache => invoke the expensive
// operation to fetch them
results = _repository.GetResults();
// store the results into the cache so that on subsequent calls on this action
// the expensive operation would not be called
HttpContext.Cache["results"] = results;
}
// return the results to the view for displaying
return View(results);
}