From 79f95f4243bb5ef77f904454a3de107b7de90d93 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 May 2018 23:34:10 +1000 Subject: [PATCH] fixes removing content item from the cache when it is trashed --- .../PublishedCache/NuCache/PublishedSnapshotService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs index 062a696ffc..f1b95278fb 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs @@ -1072,8 +1072,8 @@ namespace Umbraco.Web.PublishedCache.NuCache // always refresh the edited data OnRepositoryRefreshed(db, content, false); - // if unpublishing, remove published data from table - if (content.PublishedState == PublishedState.Unpublishing) + // if unpublishing or if it's trashed, remove published data from table + if (content.PublishedState == PublishedState.Unpublishing || content.Trashed) db.Execute("DELETE FROM cmsContentNu WHERE nodeId=@id AND published=1", new { id = content.Id }); // if publishing, refresh the published data