qdm12 / dns

Docker DNS server on steroids to access DNS-over-TLS from Cloudflare, Google, Quad9, Quadrant or CleanBrowsing
https://hub.docker.com/r/qmcgaw/cloudflare-dns-server
MIT License
219 stars 37 forks source link

cache: remove all expired elements from oldest to newest #124

Open qdm12 opened 1 year ago

qdm12 commented 1 year ago

instead of the single oldest element

EDIT: right now the expiry time depends on the current time + lowest ttl of dns answers, so it would need a sorted insertion, which could hurt performance. This doesn't seem like a priority, will check again later.