Fixes issue with the delivery api can find unpublished content
This commit is contained in:
@@ -270,11 +270,17 @@ internal sealed class DocumentCacheService : IDocumentCacheService
|
||||
|
||||
await _databaseCacheRepository.RefreshContentAsync(draftCacheNode, content.PublishedState);
|
||||
|
||||
if (content.PublishedState == PublishedState.Publishing)
|
||||
if (content.PublishedState == PublishedState.Publishing || content.PublishedState == PublishedState.Unpublishing)
|
||||
{
|
||||
var publishedCacheNode = _cacheNodeFactory.ToContentCacheNode(content, false);
|
||||
|
||||
await _databaseCacheRepository.RefreshContentAsync(publishedCacheNode, content.PublishedState);
|
||||
|
||||
if (content.PublishedState == PublishedState.Unpublishing)
|
||||
{
|
||||
await _hybridCache.RemoveAsync(GetCacheKey(publishedCacheNode.Key, false));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scope.Complete();
|
||||
|
||||
Reference in New Issue
Block a user