Adds cache bursting to production mode

Package installer bumps CDF version, we make sure to purge the angular
cache
initial js loader gets a cache burst as well
This commit is contained in:
perploug
2014-02-10 13:02:16 +01:00
parent 2850c3c3de
commit 36a8599e62
8 changed files with 83 additions and 31 deletions

View File

@@ -41,17 +41,17 @@ namespace Umbraco.Web.UI.JavaScript
public string GetJavascriptInitialization(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)
{
var result = GetJavascriptInitializationArray(httpContext, umbracoInit, additionalJsFiles);
var noCache = "";
var noCache = string.Empty;
//if debugging, add timestamp, if in production CDF will append CDF version (and should also append umb version)
if (httpContext.IsDebuggingEnabled)
{
noCache = Resources.JsNoCache;
}
return ParseMain(
noCache,
result.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
return ParseMain(
noCache,
result.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
}
public JArray GetJavascriptInitializationArray(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)