[Feature request] Ability to serve expired records in the cache by type.

alpominth at disroot.org alpominth at disroot.org
Sun May 7 22:31:37 UTC 2023


Here in my tests, prefetch option only works when serve-expired is enabled.


Here is one of my configuration files:


server:
 interface: 127.0.0.1
 interface: ::1
 port: 53
 cache-max-ttl: 21600
 cache-min-ttl: 21600
 cache-max-negative-ttl: 21600
 val-bogus-ttl: 0
 infra-host-ttl: 21600
 prefetch: yes
 serve-expired: yes
 serve-expired-ttl: 2592000
 delay-close: 10000
 chroot: ""
 username: "permcache"
 directory: ""
 pidfile: ""
 do-not-query-localhost: no
 module-config: "validator cachedb iterator"

cachedb:
 backend: redis
 # redis-server-host: ::1
 # redis-server-port: 6379
 redis-server-password: "blah123"
 redis-server-path: "/opt/permcache/db/redis-server.sock"
 redis-timeout: 5000

forward-zone:
 name: "."
 forward-addr: ::1 at 10053



/\ Prefetch works, but the negative and host cache are cached for 1 month when prefetching is enabled, I would like to set a very short caching time for them, 1 or 2 days.



Options for controlling the expired host cache and negative cache separately would be a very good idea, as negative and host entries would have different TTLs.



The options could be:

serve-expired-negative-ttl: <seconds>
serve-expired-infra-host-ttl: <seconds>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20230507/703cfe46/attachment.htm>


More information about the Unbound-users mailing list