Skip to content

Commit

Permalink
Replace cache deletion with cache clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Feb 23, 2022
1 parent fcc04b6 commit 254a9a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sciunit/models/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def clear_disk_cache(self) -> None:
path = Path(self.disk_cache_location)

if path.exists():
path.unlink()
with shelve.open(path) as cache:
cache.clear()

def get_memory_cache(self, key: str = None) -> dict:
"""Return result in memory cache for key 'key' or None if not found.
Expand Down

0 comments on commit 254a9a7

Please sign in to comment.