Filters
- 20. Cache無効化
public override void OnResultExecuting(ResultExecutingContext context)
{
context.HttpContext.Response.Cache
.SetExpires(DateTime.UtcNow.AddDays(-1));
context.HttpContext.Response.Cache.SetValidUntilExpires(false);
context.HttpContext.Response.Cache
.SetRevalidation(HttpCacheRevalidation.AllCaches);
context.HttpContext.Response.Cache
.SetCacheability(HttpCacheability.NoCache);
context.HttpContext.Response.Cache.SetNoStore();
base.OnResultExecuting(filterContext);
}