mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Clear NS1 zone cache before record cache
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user