gracePeriod parameter in AEM Dispatcher affects cache serving after expiration
This article describes how the gracePeriod parameter in Adobe Experience Manager Dispatcher controls the serving of stale cache content after cache expiration and before new content is fetched.
Description description
Environment
Adobe Experience Manager Dispatcher (all versions)
Symptoms
There is uncertainty about whether Dispatcher serves stale cached content to users during the grace period after the cached content expires and before fresh content is retrieved from the origin server.
Cause
The gracePeriod parameter is designed to improve user experience by serving stale cache for a short, defined period when the origin server is slow or temporarily unavailable.
Resolution resolution
Follow the steps below to understand and manage the gracePeriod parameter:
- Review the Dispatcher cache configuration and locate the
gracePeriodparameter. - Verify the configured value of
gracePeriod. When a value is configured, such asgracePeriod "2", Dispatcher continues to serve expired (stale) cached content for the specified number of seconds after the cache TTL expires while it attempts to retrieve fresh content from the origin server. - During the grace period, users receive the stale cached content until either fresh content is successfully retrieved from the origin server or the configured grace period expires.
- After the grace period expires, if fresh content is still unavailable, Dispatcher stops serving the stale cached content and waits for a response from the origin server.
- Verify that the configured
gracePeriodvalue aligns with your content freshness and availability requirements.
recommendation-more-help
experience-cloud-kcs-help-kbarticles