Skip to content

Commit

Permalink
Use internal property and internal method for cache_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 20, 2024
1 parent 7b3c162 commit b29f833
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/lsst/daf/butler/remote_butler/_remote_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def dimensions(self) -> DimensionUniverse:
return cache.dimensions

@property
def datastore_cache_manager(self) -> AbstractDatastoreCacheManager:
def _cache_manager(self) -> AbstractDatastoreCacheManager:
"""Cache manager to use when reading files from the butler."""
# RemoteButler does not get any cache configuration from the server.
# Read the Datastore default config (which is a FileDatastore)
Expand All @@ -204,7 +204,6 @@ def datastore_cache_manager(self) -> AbstractDatastoreCacheManager:
# defaults for DatastoreConfig no longer include the cache.
if self._datastore_cache_manager is None:
datastore_config = DatastoreConfig()
self._datastore_cache_manager: AbstractDatastoreCacheManager
if "cached" in datastore_config:
self._datastore_cache_manager = DatastoreCacheManager(
datastore_config["cached"], universe=self.dimensions
Expand Down Expand Up @@ -295,7 +294,7 @@ def _get_dataset_as_python_object(
ref,
_to_file_payload(model),
parameters=parameters,
cache_manager=self.datastore_cache_manager,
cache_manager=self._cache_manager,
)

def _get_file_info(
Expand Down

0 comments on commit b29f833

Please sign in to comment.