fixes removing content item from the cache when it is trashed

This commit is contained in:
Shannon
2018-05-31 23:34:10 +10:00
parent 437855979d
commit 79f95f4243

View File

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