예제 #1
0
 /// <summary>
 /// This method is an implementation of System.Web.Mvc.IActionFilter.OnActionExecuted(System.Web.Mvc.ActionExecutedContext)
 /// and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.
 /// </summary>
 /// <param name="filterContext">The filter context</param>
 public override void OnActionExecuted(ActionExecutedContext filterContext)
 {
     if (!_foundInCache)
     {
         ICacheService cacheService = new InMemoryCache();
         cacheService.InsertIntoCache(GenerateKey, filterContext.Result, _duration);
     }
     base.OnActionExecuted(filterContext);
 }
예제 #2
0
 /// <summary>
 /// This method is an implementation of System.Web.Mvc.IActionFilter.OnActionExecuted(System.Web.Mvc.ActionExecutedContext)
 /// and supports the ASP.NET MVC infrastructure. It is not intended to be used directly from your code.
 /// </summary>
 /// <param name="filterContext">The filter context</param>
 public override void OnActionExecuted(ActionExecutedContext filterContext)
 {
     if (!_foundInCache)
     {
         ICacheService cacheService = new InMemoryCache();
         cacheService.InsertIntoCache(GenerateKey, filterContext.Result, _duration);
     }
     base.OnActionExecuted(filterContext);
 }