Adobe Experience Manager: serve stale content when no render available
In Adobe Experience Manager, to enable the Dispatcher module to serve stale content, an additional flag /serveStaleOnError has to be set in the /cache section.
Description description
Environment
-
Adobe Experience Manager
-
Dispatcher 4.1.1
Issue/Symptoms
Sometimes the publish render instance is not available via the Dispatcher module (e.g. due to a network outage). Parts of the site may be unavailable if the corresponding cache is invalidated. However, you can continue to deliver cached content from the Dispatcher that may have become stale. Starting with Dispatcher 4.1.1, you can allow the delivery of stale cache where no render is available in the farm.
A cached item is considered stale when it has been invalidated (e.g. as part of an activation where the .stat file is touched, invalidating cached items with an older timestamp).
Resolution resolution
To enable this feature, set an additional flag /serveStaleOnError below the /cachesection:
DISPATCHER.ANY
/cache
# Flag indicating whether the dispatcher should serve stale content if
# no remote server is available.
/serveStaleOnError "1"
Note: Only the following response codes are considered:
- 502 - Bad Gateway
- 503 - Service Unavailable
- 504 - Gateway Timeout