From f7428ac67bd30e6e7b157cc389275b272335fc4e Mon Sep 17 00:00:00 2001 From: Lars-Erik Date: Mon, 19 Jul 2021 12:55:13 +0200 Subject: [PATCH] Decouple NuCache.Property from NuCache.PublishedSnapshot --- src/Umbraco.Web/PublishedCache/NuCache/Property.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/Property.cs b/src/Umbraco.Web/PublishedCache/NuCache/Property.cs index 86023bb302..50837acced 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/Property.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/Property.cs @@ -124,7 +124,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private CacheValues GetCacheValues(PropertyCacheLevel cacheLevel) { CacheValues cacheValues; - PublishedSnapshot publishedSnapshot; + IPublishedSnapshot publishedSnapshot; IAppCache cache; switch (cacheLevel) { @@ -141,7 +141,7 @@ namespace Umbraco.Web.PublishedCache.NuCache // elements cache (if we don't want to pollute the elements cache with short-lived // data) depending on settings // for members, always cache in the snapshot cache - never pollute elements cache - publishedSnapshot = (PublishedSnapshot) _publishedSnapshotAccessor.PublishedSnapshot; + publishedSnapshot = _publishedSnapshotAccessor.PublishedSnapshot; cache = publishedSnapshot == null ? null : ((_isPreviewing == false || PublishedSnapshotService.FullCacheWhenPreviewing) && (_isMember == false) @@ -151,7 +151,7 @@ namespace Umbraco.Web.PublishedCache.NuCache break; case PropertyCacheLevel.Snapshot: // cache within the snapshot cache - publishedSnapshot = (PublishedSnapshot) _publishedSnapshotAccessor.PublishedSnapshot; + publishedSnapshot = _publishedSnapshotAccessor.PublishedSnapshot; cache = publishedSnapshot?.SnapshotCache; cacheValues = GetCacheValues(cache); break;