From e5da4608a6510d3049709f6415f3585995180e03 Mon Sep 17 00:00:00 2001 From: Russell Jones Date: Mon, 15 Dec 2014 14:42:26 -0800 Subject: [PATCH] Don't cache false responses. --- flanker/addresslib/validate.py | 6 ++++-- setup.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/flanker/addresslib/validate.py b/flanker/addresslib/validate.py index a85e3cc5..aac81549 100644 --- a/flanker/addresslib/validate.py +++ b/flanker/addresslib/validate.py @@ -138,7 +138,8 @@ def mail_exchanger_lookup(domain, metrics=False): mx_hosts = lookup_domain(domain) mtimes['dns_lookup'] += time.time() - bstart if mx_hosts is None: - mx_cache[domain] = False + #commenting out falses in the cache, be sure to monitor backend load. - Jason + #mx_cache[domain] = False return None, mtimes # test connecting to the mx exchanger @@ -146,7 +147,8 @@ def mail_exchanger_lookup(domain, metrics=False): mail_exchanger = connect_to_mail_exchanger(mx_hosts) mtimes['mx_conn'] = time.time() - bstart if mail_exchanger is None: - mx_cache[domain] = False + #commenting out falses in the cache, be sure to monitor backend load. - Jason + #mx_cache[domain] = False return None, mtimes # valid mx records, connected to mail exchanger, return True diff --git a/setup.py b/setup.py index d2c26da3..f7c55971 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup(name='flanker', - version='0.3.24', + version='0.3.25', description='Mailgun Parsing Tools', long_description=open('README.rst').read(), classifiers=[],