We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95a553e commit c1e2369Copy full SHA for c1e2369
lib/vsc/utils/cache.py
@@ -143,7 +143,13 @@ def load(self, key):
143
144
@returns: (timestamp, data) if there is data for the given key, None otherwise.
145
"""
146
- return self.new_shelf.get(key, None) or self.shelf.get(key, None)
+ result = None
147
+ if self.new_shelf is not None:
148
+ result = self.new_shelf.get(key, None)
149
+ if result is None and self.shelf is not None:
150
+ return self.shelf.get(key, None)
151
+
152
+ return result
153
154
def retain(self):
155
"""Retain non-updated data on close."""
0 commit comments