[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Philip K.
Subject: bug#40355: [PATCH] Implement caching for libravatar lookup
Date: Tue, 31 Mar 2020 23:30:23 +0200

Robert Pluim <address@hidden> writes:

>>>>>> On Tue, 31 Mar 2020 20:03:36 +0200, Philip K <address@hidden> said:
> I doubt you need the 'cache' arg, you can keep the cache purely
> internal.

I added it because I was considering defining gravatar-libravatar-cache

    (let ((cache (make-hash-table :test 'equal)))
      (dolist (domain '("aol.com" "att.net" "comcast.net" "facebook.com"
                        "gmail.com" "gmx.com" "googlemail.com" "google.com"
                        "hotmail.com" "hotmail.co.uk" "mac.com" "me.com"
                        "mail.com" "msn.com" "live.com" "sbcglobal.net"
                        ;; ...
        (gravatar--service-libravatar (concat "ignored@" domain) cache))

with a few popular domains. The only issue is that evaluating it takes

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

I haven't managed to gather good real-world data yet, but I would assume
something along the lines of 50-200 domains?

        Philip K.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]