diff options
author | 2022-06-07 09:43:03 -0400 | |
---|---|---|
committer | 2022-06-07 09:43:03 -0400 | |
commit | 4690d10f871dd0ad3f94b27cdeca35a3f6690995 (patch) | |
tree | 73cc0516428ce4852cb7a8c1b7c9430a61802264 | |
parent | 3f07c2397a8501f184a70842068239164a031285 (diff) | |
download | coredns-4690d10f871dd0ad3f94b27cdeca35a3f6690995.tar.gz coredns-4690d10f871dd0ad3f94b27cdeca35a3f6690995.tar.zst coredns-4690d10f871dd0ad3f94b27cdeca35a3f6690995.zip |
plugin/cache: Reword serve_stale docs for clarity (#5394)
* reword for clarity; use consistent terminology
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
-rw-r--r-- | plugin/cache/README.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/cache/README.md b/plugin/cache/README.md index 98363abbe..85a2d1027 100644 --- a/plugin/cache/README.md +++ b/plugin/cache/README.md @@ -54,12 +54,12 @@ cache [TTL] [ZONES...] { **DURATION** defaults to 1m. Prefetching will happen when the TTL drops below **PERCENTAGE**, which defaults to `10%`, or latest 1 second before TTL expiration. Values should be in the range `[10%, 90%]`. Note the percent sign is mandatory. **PERCENTAGE** is treated as an `int`. -* `serve_stale`, when serve\_stale is set, cache always will serve an expired entry to a client if there is one - available. When this happens, cache will attempt to refresh the cache entry after sending the expired cache - entry to the client. The responses have a TTL of 0. **DURATION** is how far back to consider - stale responses as fresh. The default duration is 1h. **REFRESH_MODE** controls when the attempt to refresh - the cache happens. `verified` will first verify that an entry is still unavailable from the source before sending - the stale response to the client. `immediate` will immediately send the expired response to the client before +* `serve_stale`, when serve\_stale is set, cache will always serve an expired entry to a client if there is one + available as long as it has not been expired for longer than **DURATION** (default 1 hour). By default, the _cache_ plugin will + attempt to refresh the cache entry after sending the expired cache entry to the client. The + responses have a TTL of 0. **REFRESH_MODE** controls the timing of the expired cache entry refresh. + `verified` will first verify that an entry is still unavailable from the source before sending the expired entry to the client. + `immediate` will immediately send the expired entry to the client before checking to see if the entry is available from the source. **REFRESH_MODE** defaults to `immediate`. Setting this value to `verified` can lead to increased latency when serving stale responses, but will prevent stale entries from ever being served if an updated response can be retrieved from the source. |