From d0225a79079cc9e346654ac4f15c1960d4ed252e Mon Sep 17 00:00:00 2001 From: Nick Williams Date: Tue, 26 Mar 2019 10:42:52 -0500 Subject: [PATCH] Fix #176: Ensure that the local cache is reset if the remote cache is cleared Per #176, we need to make sure that the local cache gets reset if the remote cache is cleared. This commit accomplishes that. --- modeldict/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modeldict/base.py b/modeldict/base.py index 1b5c1dc..971d355 100644 --- a/modeldict/base.py +++ b/modeldict/base.py @@ -176,6 +176,9 @@ def _populate(self, reset=False): # We've updated from remote, so mark ourselves as # such so that we won't expire until the next timeout self._local_last_updated = now + else: + self._local_cache = None + self._local_last_updated = None # We last checked for remote changes just now self._last_checked_for_remote_changes = now