Try our conversational search powered by Generative AI!

Cache might serve stale content

Found in

EPiServer.CMS.Core 12.13.1

Fixed in

EPiServer.CMS.Core 12.19.1

Created

Oct 05, 2023

Updated

Oct 20, 2023

Area

CMS Core

State

Closed, Fixed and tested


Description

Fixed an issue where caching may serve outdated content, even after content was republished. This situation arose when a content item remained untouched for the expiration period (default 12 hours) and is then was accessed before ASP.NET Core initiates a scan of expired items (default maximum 60s after expiration). 

The cache duration for content was reduced to 1 minute when content was loaded in a scheduled job, thereby increasing the likelihood of this occurring for longer running jobs that triggers multiple reloads of content from the database.

Known workarounds:

  • Restarting the instance fixes the problem.
  • Call IContentCacheRemover.RemoveLanguage in a scheduled job to remove a specific language from the cache.
  • Using ContentCacheScope in a scheduled job to increase the expiration to cover the length of the job.