dnsproxy icon indicating copy to clipboard operation
dnsproxy copied to clipboard

Optimistic/Pessimistic cache

Open iJorgen opened this issue 1 year ago • 0 comments

I'm a bit confused... ;-) I read that "optimistic caching" in general means that it first tries online before using a cached result and "pessimistic caching" is using a cached result before going online. Is that correct for DNSproxy too?

If I have optimistic caching turned on and I can see the same queries in the DNS-log upstream several times within seconds if I start the same app on different devices. So it queries the upstream servers each time and don't primarily use the cache?! Would it be better to not use optimistic caching to make it use the cached results first?! I wanna do "pessimistic caching" to use the cache first.

Found a site describing it. Not about DNS, but the same principles... https://itnext.io/caching-in-a-pwa-when-to-use-optimistic-vs-pessimistic-d627a5943990

iJorgen avatar Sep 21 '22 05:09 iJorgen