From: Russell Jones Date: Mon, 15 Dec 2014 22:42:26 +0000 (-0800) Subject: Don't cache false responses. X-Git-Tag: v0.3.25 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e5da4608a6510d3049709f6415f3585995180e03;p=flanker.git Don't cache false responses. --- diff --git a/flanker/addresslib/validate.py b/flanker/addresslib/validate.py index a85e3cc..aac8154 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 d2c26da..f7c5597 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages setup(name='flanker', - version='0.3.24', + version='0.3.25', description='Mailgun Parsing Tools', long_description=open('README.rst').read(), classifiers=[],