From 349cb91e3a4d37f4ab9648373ca095f2ec5a9431 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 25 Mar 2015 15:48:57 +1100 Subject: [PATCH] updates expires logic --- src/Umbraco.Web/Mvc/DisableClientCacheAttribute.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Mvc/DisableClientCacheAttribute.cs b/src/Umbraco.Web/Mvc/DisableClientCacheAttribute.cs index 448e04222c..c266b1ed5e 100644 --- a/src/Umbraco.Web/Mvc/DisableClientCacheAttribute.cs +++ b/src/Umbraco.Web/Mvc/DisableClientCacheAttribute.cs @@ -13,7 +13,8 @@ namespace Umbraco.Web.Mvc { if (filterContext.IsChildAction) base.OnResultExecuting(filterContext); - filterContext.HttpContext.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); + filterContext.HttpContext.Response.Cache.SetExpires(DateTime.Now.AddDays(-10)); + filterContext.HttpContext.Response.Cache.SetLastModified(DateTime.Now); filterContext.HttpContext.Response.Cache.SetValidUntilExpires(false); filterContext.HttpContext.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);