Subject: Re: bug#40355: [PATCH] Implement caching for libravatar lookup

From: Robert Pluim <[email-masked]>
Date: Tue, 31 Mar 2020 21:58:49 +0200

>>>>> On Tue, 31 Mar 2020 20:03:36 +0200, Philip K <[email-masked]> said:

    Philip> Checking if a domain has an avatar server associated with it requires
    Philip> at most two (synchronous) DNS queries, at least to ultimately default
    Philip> to "libravatar.org". Caching the results of domain lookups reduced the
    Philip> evaluation time (on my machine) from ~0.3s to an instantaneous
    Philip> evaluation.

I doubt you need the 'cache' arg, you can keep the cache purely
internal.

How big is this cache likely to get? Perhaps use a weak hash table?

Robert