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.

A624CA4B-024E-4E27-823D-9216D620C325

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

Most upvoted comments

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