From 4edc1cf56b10c14f1542d09ceef991cfc7b55a3f Mon Sep 17 00:00:00 2001 From: DheerajP Date: Wed, 30 Aug 2017 16:44:53 +0100 Subject: [PATCH] Updated to support sitecore 8 --- .gitignore | 2 + Code/App_Config/Include/SitecoreCDN.config | 102 ++++++++++----------- Code/Caching/ExcludeIncludeCache.cs | 2 +- Code/Caching/UrlCache.cs | 2 +- Code/NTTData.SitecoreCDN.csproj | 23 +++-- Code/Providers/CDNMediaProvider.cs | 56 +++++------ Code/Providers/CDNProvider.cs | 2 +- Code/packages.config | 4 + 8 files changed, 104 insertions(+), 89 deletions(-) create mode 100644 Code/packages.config diff --git a/.gitignore b/.gitignore index 5ebd21a..886a37c 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ pip-log.txt # Mac crap .DS_Store +Code/packages/ +Code/NTTData.SitecoreCDN.sln diff --git a/Code/App_Config/Include/SitecoreCDN.config b/Code/App_Config/Include/SitecoreCDN.config index e720206..05070a1 100644 --- a/Code/App_Config/Include/SitecoreCDN.config +++ b/Code/App_Config/Include/SitecoreCDN.config @@ -1,35 +1,34 @@ - - - + + + NTTData.SitecoreCDN.Providers.CDNMediaProvider, NTTData.SitecoreCDN + + + + + - + - - - - - - - - - - - - - - - - - - - - - + + + + - - + + - - - - - - - - - + + + + - + + + + - - - - - - - - + + + + + + + + - - - - yourcdnhostname - - - + + + cdnHostName + + + diff --git a/Code/Caching/ExcludeIncludeCache.cs b/Code/Caching/ExcludeIncludeCache.cs index 5e3c5d2..7e3b1f3 100644 --- a/Code/Caching/ExcludeIncludeCache.cs +++ b/Code/Caching/ExcludeIncludeCache.cs @@ -37,7 +37,7 @@ public ExcludeIncludeCache(string name, long maxSize) public void SetResult(string path, bool result) { - this.SetObject(path, result, sizeof(bool)); + this.SetObject(path, result); //this.SetString(path, url, DateTime.UtcNow.Add(_cacheTime)); } diff --git a/Code/Caching/UrlCache.cs b/Code/Caching/UrlCache.cs index 01773a0..844a5d4 100644 --- a/Code/Caching/UrlCache.cs +++ b/Code/Caching/UrlCache.cs @@ -19,7 +19,7 @@ public class UrlCache: CustomCache public UrlCache(string name, long maxSize) : base(name, maxSize) { - this.InnerCache.Scavengable = true; + //this.InnerCache.Scavengable = true; _cacheTime = Settings.GetTimeSpanSetting("SitecoreCDN.UrlVersionCacheTime", "00:05:00"); } diff --git a/Code/NTTData.SitecoreCDN.csproj b/Code/NTTData.SitecoreCDN.csproj index 0aa39bc..81d821c 100644 --- a/Code/NTTData.SitecoreCDN.csproj +++ b/Code/NTTData.SitecoreCDN.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties NTTData.SitecoreCDN NTTData.SitecoreCDN - v4.0 + v4.5.2 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -29,13 +31,16 @@ TRACE prompt 4 + false - - ..\Dependencies\HtmlAgilityPack.dll + + packages\HtmlAgilityPack.1.4.6\lib\Net40\HtmlAgilityPack.dll + True - - ..\Dependencies\Sitecore.Kernel.dll + + False + packages\Sitecore-8.1-update-3\Sitecore.Kernel.dll @@ -58,7 +63,6 @@ - @@ -66,7 +70,10 @@ - + + + +