Fix: Updated Caching Policy for Bundles

This commit is contained in:
Gary Sharp
2013-06-27 16:50:56 +10:00
parent 7dfae21978
commit 9076b34f83
9 changed files with 17 additions and 19 deletions
@@ -120,13 +120,11 @@ namespace Disco.Web.Extensions.MvcExtensions.Bundles
// Write Headers
var cache = context.Response.Cache;
cache.SetCacheability(HttpCacheability.Public);
cache.SetOmitVaryStar(true);
cache.SetExpires(DateTime.Now.AddYears(1));
cache.SetValidUntilExpires(true);
cache.SetMaxAge(TimeSpan.FromDays(365));
cache.SetLastModified(DateTime.Now);
cache.VaryByHeaders["User-Agent"] = true;
cache.SetCacheability(HttpCacheability.Public);
// Write File
context.Response.WriteFile(this.File);