diff --git a/src/OrchardCore/OrchardCore.Infrastructure/Documents/DocumentManager.cs b/src/OrchardCore/OrchardCore.Infrastructure/Documents/DocumentManager.cs index 239b946eef4..cb36c72e893 100644 --- a/src/OrchardCore/OrchardCore.Infrastructure/Documents/DocumentManager.cs +++ b/src/OrchardCore/OrchardCore.Infrastructure/Documents/DocumentManager.cs @@ -358,10 +358,7 @@ protected async Task InvalidateInternalAsync(TDocument document, bool failover = { await _distributedCache.RemoveAsync(_options.CacheIdKey); } - else - { - _memoryCache.Remove(_options.CacheIdKey); - } + _memoryCache.Remove(_options.CacheIdKey); } private async Task GetFromDistributedCacheAsync()