You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mail_exchanger_lookup() fails to connect to the mail exchanger for a specific domain, it sets the corresponding cache entry to False (line 149). However, lookup_exchanger_in_cache() looks for the string'False' to figure out if there was an MX connection failure for a domain in cache.
This asymmetry means that caches that implement proper dict semantics (i.e. not coercing all values to strings unlike the Redis driver) fail miserably. I believe that a simple in memory cache like defaultdict(lambda: None) should just work and not fail with TypeError. This behaviour is also the root cause for #31.
The text was updated successfully, but these errors were encountered:
When
mail_exchanger_lookup()
fails to connect to the mail exchanger for a specific domain, it sets the corresponding cache entry toFalse
(line 149). However,lookup_exchanger_in_cache()
looks for the string'False'
to figure out if there was an MX connection failure for a domain in cache.This asymmetry means that caches that implement proper dict semantics (i.e. not coercing all values to strings unlike the Redis driver) fail miserably. I believe that a simple in memory cache like
defaultdict(lambda: None)
should just work and not fail with TypeError. This behaviour is also the root cause for #31.The text was updated successfully, but these errors were encountered: