]> khamidou — GitHub mirrors - flanker.git/commitdiff
Don't cache false responses. rjones/cache-posisitve v0.3.25
authorRussell Jones <rjones@mailgunhq.com>
Mon, 15 Dec 2014 22:42:26 +0000 (14:42 -0800)
committerRussell Jones <rjones@mailgunhq.com>
Mon, 15 Dec 2014 22:42:26 +0000 (14:42 -0800)
flanker/addresslib/validate.py
setup.py

index a85e3cc5fe08780a15808258d90bb5aeebf28280..aac815492a50cc35445e8ccf98b4e065f3d80789 100644 (file)
@@ -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
index d2c26da3b5e9bd73690fc839ae08af088e0a9c1f..f7c55971be4ad34b7d89c81d41e2b3e962694336 100644 (file)
--- 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=[],