Problem

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?

Resolution, Answer

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:

dispatcher.any

/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

Applies to

Dispatcher 4.1.1

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책