chore(docs): regenerate man pages (#7971)

This commit is contained in:
Ville Vesilehto
2026-03-27 05:35:09 +02:00
committed by GitHub
parent 49b18b8af6
commit 0132ad86b5
60 changed files with 2110 additions and 280 deletions

View File

@@ -1,5 +1,5 @@
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
.TH "COREDNS-CACHE" 7 "March 2021" "CoreDNS" "CoreDNS Plugins"
.TH "COREDNS-CACHE" 7 "March 2026" "CoreDNS" "CoreDNS Plugins"
.SH "NAME"
.PP
@@ -12,8 +12,7 @@ With \fIcache\fP enabled, all records except zone transfers and metadata records
database, etc.) is expensive.
.PP
\fICache\fP will change the query to enable DNSSEC (DNSSEC OK; DO) if it passes through the plugin. If
the client didn't request any DNSSEC (records), these are filtered out when replying.
\fICache\fP will pass DNSSEC (DNSSEC OK; DO) options through the plugin for upstream queries.
.PP
This plugin can only be used once per Server Block.
@@ -38,6 +37,11 @@ Setting a TTL of 300: \fB\fCcache 300\fR would cache records up to 300 seconds.
.PP
Each element in the cache is cached according to its TTL (with \fBTTL\fP as the max).
Note that \fBTTL\fP only caps the cache duration and does not extend it. A record with a 30s TTL
will still be cached for 30s even with \fB\fCcache 600\fR. The minimum cache duration defaults to 5
seconds and can be adjusted per cache type using \fBMINTTL\fP in the \fB\fCsuccess\fR or \fB\fCdenial\fR directives.
.PP
A cache is divided into 256 shards, each holding up to 39 items by default - for a total size
of 256 * 39 = 9984 items.
@@ -52,7 +56,10 @@ cache [TTL] [ZONES...] {
success CAPACITY [TTL] [MINTTL]
denial CAPACITY [TTL] [MINTTL]
prefetch AMOUNT [[DURATION] [PERCENTAGE%]]
serve\_stale [DURATION]
serve\_stale [DURATION] [REFRESH\_MODE]
servfail DURATION
disable success|denial [ZONES...]
keepttl
}
.fi
@@ -76,10 +83,28 @@ Popular means \fBAMOUNT\fP queries have been seen with no gaps of \fBDURATION\fP
which defaults to \fB\fC10%\fR, or latest 1 second before TTL expiration. Values should be in the range \fB\fC[10%, 90%]\fR.
Note the percent sign is mandatory. \fBPERCENTAGE\fP is treated as an \fB\fCint\fR.
.IP \(bu 4
\fB\fCserve_stale\fR, 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. \fBDURATION\fP is how far back to consider
stale responses as fresh. The default duration is 1h.
\fB\fCserve_stale\fR, 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 \fBDURATION\fP (default 1 hour). By default, the \fIcache\fP plugin will
attempt to refresh the cache entry after sending the expired cache entry to the client. The
responses have a TTL of 0. \fBREFRESH_MODE\fP controls the timing of the expired cache entry refresh.
\fB\fCverify\fR will first verify that an entry is still unavailable from the source before sending the expired entry to the client.
\fB\fCimmediate\fR will immediately send the expired entry to the client before
checking to see if the entry is available from the source. \fBREFRESH_MODE\fP defaults to \fB\fCimmediate\fR. Setting this
value to \fB\fCverify\fR 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.
.IP \(bu 4
\fB\fCservfail\fR cache SERVFAIL responses for \fBDURATION\fP. Setting \fBDURATION\fP to 0 will disable caching of SERVFAIL
responses. If this option is not set, SERVFAIL responses will be cached for 5 seconds. \fBDURATION\fP may not be
greater than 5 minutes.
.IP \(bu 4
\fB\fCdisable\fR disable the success or denial cache for the listed \fBZONES\fP. If no \fBZONES\fP are given, the specified
cache will be disabled for all zones.
.IP \(bu 4
\fB\fCkeepttl\fR do not age TTL when serving responses from cache. The entry will still be removed from cache
when the TTL expires as normal, but until it expires responses will include the original TTL instead
of the remaining TTL. This can be useful if CoreDNS is used as an authoritative server and you want
to serve a consistent TTL to downstream clients. This is \fBNOT\fP recommended when CoreDNS is caching
records it is not authoritative for because it could result in downstream clients using stale answers.
.SH "CAPACITY AND EVICTION"
@@ -98,17 +123,21 @@ Entries with 0 TTL will remain in the cache until randomly evicted when the shar
If monitoring is enabled (via the \fIprometheus\fP plugin) then the following metrics are exported:
.IP \(bu 4
\fB\fCcoredns_cache_entries{server, type}\fR - Total elements in the cache by cache type.
\fB\fCcoredns_cache_entries{server, type, zones, view}\fR - Total elements in the cache by cache type.
.IP \(bu 4
\fB\fCcoredns_cache_hits_total{server, type}\fR - Counter of cache hits by cache type.
\fB\fCcoredns_cache_hits_total{server, type, zones, view}\fR - Counter of cache hits by cache type.
.IP \(bu 4
\fB\fCcoredns_cache_misses_total{server}\fR - Counter of cache misses.
\fB\fCcoredns_cache_misses_total{server, zones, view}\fR - Counter of cache misses. - Deprecated, derive misses from cache hits/requests counters.
.IP \(bu 4
\fB\fCcoredns_cache_prefetch_total{server}\fR - Counter of times the cache has prefetched a cached item.
\fB\fCcoredns_cache_requests_total{server, zones, view}\fR - Counter of cache requests.
.IP \(bu 4
\fB\fCcoredns_cache_drops_total{server}\fR - Counter of responses excluded from the cache due to request/response question name mismatch.
\fB\fCcoredns_cache_prefetch_total{server, zones, view}\fR - Counter of times the cache has prefetched a cached item.
.IP \(bu 4
\fB\fCcoredns_cache_served_stale_total{server}\fR - Counter of requests served from stale cache entries.
\fB\fCcoredns_cache_drops_total{server, zones, view}\fR - Counter of responses excluded from the cache due to request/response question name mismatch.
.IP \(bu 4
\fB\fCcoredns_cache_served_stale_total{server, zones, view}\fR - Counter of requests served from stale cache entries.
.IP \(bu 4
\fB\fCcoredns_cache_evictions_total{server, type, zones, view}\fR - Counter of cache evictions.
.PP
@@ -163,3 +192,19 @@ example.org {
.fi
.RE
.PP
Enable caching for \fB\fCexample.org\fR, but do not cache denials in \fB\fCsub.example.org\fR:
.PP
.RS
.nf
example.org {
cache {
disable denial sub.example.org
}
}
.fi
.RE