diff options
-rw-r--r-- | middleware/auto/walk.go | 1 | ||||
-rw-r--r-- | middleware/cache/README.md | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/middleware/auto/walk.go b/middleware/auto/walk.go index 3f7ebb19f..a66259728 100644 --- a/middleware/auto/walk.go +++ b/middleware/auto/walk.go @@ -43,6 +43,7 @@ func (a Auto) Walk() error { log.Printf("[WARNING] Opening %s failed: %s", path, err) return nil } + defer reader.Close() zo, err := file.Parse(reader, origin, path) if err != nil { diff --git a/middleware/cache/README.md b/middleware/cache/README.md index e952f058b..145ce2fdf 100644 --- a/middleware/cache/README.md +++ b/middleware/cache/README.md @@ -1,6 +1,6 @@ # cache -*cache* enables a frontend cache. +*cache* enables a frontend cache. It will cache all records except zone transfers and metadata records. ## Syntax @@ -8,13 +8,15 @@ cache [TTL] [ZONES...] ~~~ -* **TTL** max TTL in seconds. If not specified, the maximum TTL will be used which is 1 hour for - noerror responses and half an hour for denial of existence ones. +* **TTL** max TTL in seconds. If not specified, the maximum TTL will be used which is 3600 for + noerror responses and 1800 for denial of existence ones. + A set TTL of 300 *cache 300* would cache the record up to 300 seconds. + Smaller record provided TTLs will take precedence. * **ZONES** zones it should cache for. If empty, the zones from the configuration block are used. Each element in the cache is cached according to its TTL (with **TTL** as the max). For the negative cache, the SOA's MinTTL value is used. A cache can contain up to 10,000 items by -default. A TTL of zero is not allowed. +default. A TTL of zero is not allowed. No cache invalidation triggered by other middlewares is available. Therefore even reloaded items might still be cached for the duration of the TTL. If you want more control: |