Jul 30, 2009, 6:38 AM
[FIXED] [V0.8.2] Vary: * headers sent from coolite.axd
Hi,
Not sure if this is a bug and whether my workaround is a good one, but I've had an issue with requests for resources not being cached (in release mode too). For example, requests for sprites which should of been cached are being requested and downloaded (Http 200 not 304) on mouseover events.
I made a quick mod to ResourceManager.cs to exclude the vary: * header but not sure whether this is the right thing to do or not, it certainly fixes the issue as can been seen in my fiddler logs. Anyone have a comment on this?
Not sure if this is a bug and whether my workaround is a good one, but I've had an issue with requests for resources not being cached (in release mode too). For example, requests for sprites which should of been cached are being requested and downloaded (Http 200 not 304) on mouseover events.
I made a quick mod to ResourceManager.cs to exclude the vary: * header but not sure whether this is the right thing to do or not, it certainly fixes the issue as can been seen in my fiddler logs. Anyone have a comment on this?
HttpCachePolicy cache = context.Response.Cache;
cache.SetLastModified(new DateTime(ResourceManager.GetAssemblyTime(typeof(ResourceManager).Assembly)));
// begin mods
cache.SetOmitVaryStar(true);
cache.SetVaryByCustom("v");
//cache.VaryByParams["v"] = true;
// end of mods
cache.SetExpires(DateTime.UtcNow.AddYears(1));
cache.SetValidUntilExpires(true);
cache.SetCacheability(HttpCacheability.Public);