Moves the JsNoCache to a real readable file instead of an embedded string (now an embedded file resource), updates it's logic to not append the hash to any dependencyhandler.axd request, fixes case sensitivity checking on the URLs, changes the cdf + umb version to be a nice shorter hash of the two.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using ClientDependency.Core;
|
||||
using ClientDependency.Core.Config;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Manifest;
|
||||
using System.Linq;
|
||||
@@ -42,8 +46,6 @@ namespace Umbraco.Web.UI.JavaScript
|
||||
{
|
||||
var result = GetJavascriptInitializationArray(httpContext, umbracoInit, additionalJsFiles);
|
||||
var noCache = Resources.JsNoCache;
|
||||
|
||||
|
||||
|
||||
//if debugging, add timestamp, if in production we tell yepNope to append umb+cdf version
|
||||
//this is needed even tho cdf does this on its serverside merged js
|
||||
@@ -52,7 +54,12 @@ namespace Umbraco.Web.UI.JavaScript
|
||||
noCache = noCache.Replace("##rnd##", "(new Date).getTime()");
|
||||
else
|
||||
{
|
||||
var version = "'" + Umbraco.Core.Configuration.UmbracoVersion.Current.ToString() + "." + ClientDependency.Core.Config.ClientDependencySettings.Instance.Version + "'";
|
||||
//create a unique hash code of the current umb version and the current cdf version
|
||||
var versionHash = new HashCodeCombiner();
|
||||
versionHash.AddCaseInsensitiveString(UmbracoVersion.Current.ToString());
|
||||
versionHash.AddCaseInsensitiveString(ClientDependencySettings.Instance.Version.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
var version = "'" + versionHash.GetCombinedHashCode() + "'";
|
||||
noCache = noCache.Replace("##rnd##", version);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user