Browse Source

Clear NS1 zone cache before record cache

pull/760/head
Ross McFarland 4 years ago
parent
commit
aa88b877c4
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      octodns/provider/ns1.py

+ 6
- 4
octodns/provider/ns1.py View File

@ -205,10 +205,11 @@ class Ns1Client(object):
def records_delete(self, zone, domain, _type):
try:
# remove record from cache
del self._records_cache[zone][domain][_type]
# remove record's zone from cache
del self._zones_cache[zone]
# remove record from cache, after zone since we may not have
# fetched the record details
del self._records_cache[zone][domain][_type]
except KeyError:
# never mind if record is not found in cache
pass
@ -224,10 +225,11 @@ class Ns1Client(object):
def records_update(self, zone, domain, _type, **params):
try:
# remove record from cache
del self._records_cache[zone][domain][_type]
# remove record's zone from cache
del self._zones_cache[zone]
# remove record from cache, after zone since we may not have
# fetched the record details
del self._records_cache[zone][domain][_type]
except KeyError:
# never mind if record is not found in cache
pass


Loading…
Cancel
Save