Skip to content

Commit

Permalink
fix: Add diskcache autoreload
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Dec 9, 2024
1 parent 9e29541 commit 693147a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion skore/src/skore/persistence/disk_cache_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ def __init__(self, directory: Path):
"""
if not directory.exists():
raise DirectoryDoesNotExist(f"Directory {directory} does not exist.")
self.storage = Cache(directory)

self.directory = directory

@property
def storage(self):
"""Return the `diskcache.Cache` with the specified directory."""
return Cache(self.directory)

def __getitem__(self, key: str) -> Any:
"""
Expand Down

0 comments on commit 693147a

Please sign in to comment.