In a worst case scenario, it could happen that no publish render instance is available (e.g. network outage) via the Dispatcher module which can lead to potential unavailibility of parts of the site in case the corresponding cache has been invalidated.
How is it possible to continue delivering cached content from the Dispatcher that might have potentially become stale in the meantime?
Starting with Dispatcher 4.1.1, it is possible to configure the Dispatcher to allow the delivery of stale cache in case no render is available in the farm.
In this case, a cached item is considered stale when it has been invalidated (e.g. as part of an activation where the .stat file is touched, effectively invalidating cached items with an older timestamp).
In order to enable this feature, an additional flag /serveStaleOnError has to be set below the /cache section:
/cache # Flag indicating whether the dispatcher should serve stale content if # no remote server is available. /serveStaleOnError "1"
Please note that only the following response codes are considered:
- 502 - Bad Gateway
- 503 - Service Unavailable
- 504 - Gateway Timeout