plugin/cache: Add cache disable option (#5540)

* add cache disable options

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2022-07-28 10:51:08 -04:00
committed by GitHub
parent 2fe5273cd1
commit 95fcf2c480
6 changed files with 158 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ cache [TTL] [ZONES...] {
prefetch AMOUNT [[DURATION] [PERCENTAGE%]]
serve_stale [DURATION] [REFRESH_MODE]
servfail DURATION
disable success|denial [ZONES...]
}
~~~
@@ -67,6 +68,8 @@ cache [TTL] [ZONES...] {
* `servfail` cache SERVFAIL responses for **DURATION**. Setting **DURATION** to 0 will disable caching of SERVFAIL
responses. If this option is not set, SERVFAIL responses will be cached for 5 seconds. **DURATION** may not be
greater than 5 minutes.
* `disable` disable the success or denial cache for the listed **ZONES**. If no **ZONES** are given, the specified
cache will be disabled for all zones.
## Capacity and Eviction
@@ -124,3 +127,13 @@ example.org {
}
}
~~~
Enable caching for `example.org`, but do not cache denials in `sub.example.org`:
~~~ corefile
example.org {
cache {
disable denial sub.example.org
}
}
~~~