Skip to content

Commit

Permalink
Use more specific cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
danielballan committed Apr 5, 2024
1 parent 21700f5 commit ed5df9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tiled/adapters/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def from_uri(
access_policy=None,
):
filepath = path_from_uri(data_uri)
cache_key = (cls.__module__, cls.__name__, filepath)
cache_key = (h5py.File, filepath, "r", swmr, libver)
file = with_resource_cache(
cache_key, h5py.File, filepath, "r", swmr=swmr, libver=libver
)
Expand Down
2 changes: 1 addition & 1 deletion tiled/adapters/tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
if not isinstance(data_uri, str):
raise Exception
filepath = path_from_uri(data_uri)
cache_key = (type(self).__module__, type(self).__qualname__, filepath)
cache_key = (tifffile.TiffFile, filepath)
self._file = with_resource_cache(cache_key, tifffile.TiffFile, filepath)
self.specs = specs or []
self._provided_metadata = metadata or {}
Expand Down

0 comments on commit ed5df9e

Please sign in to comment.