blocky: Caching doesn't seem to work properly
I have caching/prefetching set up pretty generously, however it seems that some queries are slow to look up when it should already be cached.
logLevel: warn
upstream:
default:
- https://8.8.8.8/dns-query
- https://8.8.4.4/dns-query
caching:
minTime: 5m
maxTime: 30m
prefetching: true
prefetchExpires: 24h
prefetchThreshold: 2
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (12 by maintainers)
Commits related to this issue
- Improve caching of prefetched domains (#290) — committed to 0xERR0R/blocky by 0xERR0R 3 years ago
- Improve caching of prefetched domains (#290) — committed to 0xERR0R/blocky by 0xERR0R 3 years ago
I think we should return values from cache even the entry is expired (for all or maybe only for prefetched) . In this case the ttl should be 0.
I would prefer solution 2. It should be the most balanced regarding CPU time and possible cache misses.
I tested the logging issue with a test stack. test-stack blocky-config The min TTL is set to one minute and the same url is requested every two minutes.
It appears that after the prefetch initialisation every third request isen’t delivered from cache. docker log snippet