fixes routing cache key
This commit is contained in:
@@ -62,9 +62,9 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
|||||||
return "NuCache.ContentCache.RouteByContent[" + DraftOrPub(previewing) + id + LangId(culture) + "]";
|
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()
|
//public static string ContentCacheRouteByContentStartsWith()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
|||||||
if (route == null) throw new ArgumentNullException(nameof(route));
|
if (route == null) throw new ArgumentNullException(nameof(route));
|
||||||
|
|
||||||
var cache = preview == false || PublishedSnapshotService.FullCacheWhenPreviewing ? _elementsCache : _snapshotCache;
|
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));
|
return cache.GetCacheItem<IPublishedContent>(key, () => GetByRouteInternal(preview, route, hideTopLevelNode, culture));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user