From 7c05f2e86cabecc10b3f8c009b716293bdb1bcb3 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 24 Apr 2018 14:39:52 +1000 Subject: [PATCH] fixes routing cache key --- src/Umbraco.Web/PublishedCache/NuCache/CacheKeys.cs | 4 ++-- src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/CacheKeys.cs b/src/Umbraco.Web/PublishedCache/NuCache/CacheKeys.cs index 9d887f4d40..e1b86b9ad6 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/CacheKeys.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/CacheKeys.cs @@ -62,9 +62,9 @@ namespace Umbraco.Web.PublishedCache.NuCache return "NuCache.ContentCache.RouteByContent[" + DraftOrPub(previewing) + id + LangId(culture) + "]"; } - public static string ContentCacheContentByRoute(string route, bool previewing) + public static string ContentCacheContentByRoute(string route, bool previewing, CultureInfo culture) { - return "NuCache.ContentCache.ContentByRoute[" + DraftOrPub(previewing) + route + "]"; + return "NuCache.ContentCache.ContentByRoute[" + DraftOrPub(previewing) + route + LangId(culture) + "]"; } //public static string ContentCacheRouteByContentStartsWith() diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 74598186f6..c6d380ca55 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -65,7 +65,7 @@ namespace Umbraco.Web.PublishedCache.NuCache if (route == null) throw new ArgumentNullException(nameof(route)); var cache = preview == false || PublishedSnapshotService.FullCacheWhenPreviewing ? _elementsCache : _snapshotCache; - var key = CacheKeys.ContentCacheContentByRoute(route, preview); + var key = CacheKeys.ContentCacheContentByRoute(route, preview, culture); return cache.GetCacheItem(key, () => GetByRouteInternal(preview, route, hideTopLevelNode, culture)); }