fixes routing cache key

This commit is contained in:
Shannon
2018-04-24 14:39:52 +10:00
parent e9bfad3c09
commit 7c05f2e86c
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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<IPublishedContent>(key, () => GetByRouteInternal(preview, route, hideTopLevelNode, culture));
}