mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Merge branch 'main' into 147-sig-activity-changes
# Conflicts: # core/constants.py # pyproject.toml
This commit is contained in:
@@ -21,7 +21,13 @@ class SingleObjectDataCache:
|
||||
# This cache stores a single object, doesn't matter what it's called so "object" will do
|
||||
if "object" not in self._cache:
|
||||
self._cache.add("object", object_if_empty)
|
||||
self._obj = self._cache.get("object")
|
||||
try:
|
||||
self._obj = self._cache.get("object")
|
||||
except Exception:
|
||||
logger.warning(f"Failed to load cache from {cache_dir}, clearing it.")
|
||||
self._cache.clear()
|
||||
self._cache.add("object", object_if_empty)
|
||||
self._obj = object_if_empty
|
||||
|
||||
def get(self):
|
||||
"""Get the data object. This can then be manipulated as necessary across multiple threads. Any function
|
||||
|
||||
Reference in New Issue
Block a user