Add CACHE_SIZE to setupVars.conf

Thank you for your effort.

In my opinion your observation what's in the source code does not match the explanation given in the link (I believe the explanation is wrong/outdated, not the code :slight_smile:).

  1. The source code suggests that all DNS queries are prefetched. This in line with what I see because a lot gets prefetched.
total.num.queries=5292
total.num.cachehits=4460
total.num.cachemiss=832
total.num.prefetch=2735

--> Disabling Pihole's cache is not necessary, prefetching happens anyway.

  1. The deeper explanation given in the link is in line with unbound.conf man where 10% more traffic is expected as

If a client requests the dns lookup and the TTL of the cached hostname is going to expire in less than 10% of its TTL, unbound will (1st) return the ip of the host to the client and (2nd) pre-fetch the dns request from the remote dns server. This method has been shown to increase the amount of cached hits by local clients by 10% on average."

--> Disabling Pihole's cache might be beneficial as Unbound would be queried already for "close-to expiring" entries and not only for "already expired" entries

As I actually see 1) it leads me to the conclusion that the explanation given in 2) is wrong/outdated (they might have changed the behavior at some point).

Conclusion: Prefetching works also with Pihole's cache enabled and aside from a theoretical tiny tiny speed improvement there are no additional benefits from disabling it (but negative side effects on DNSSEC might occur)