diff --git a/changes/4133.doc.md b/changes/4133.doc.md new file mode 100644 index 0000000000..9690318b46 --- /dev/null +++ b/changes/4133.doc.md @@ -0,0 +1 @@ +Fixed the documented default of ``max_age_seconds`` in the ``CacheStore`` docstring: the default is ``"infinity"`` (no expiration), not ``None``, which is rejected. Also noted that ``cache_store`` must support deletes. diff --git a/src/zarr/experimental/cache_store.py b/src/zarr/experimental/cache_store.py index 1535b42f67..dd50693ad9 100644 --- a/src/zarr/experimental/cache_store.py +++ b/src/zarr/experimental/cache_store.py @@ -52,10 +52,11 @@ class CacheStore(WrapperStore[Store]): store : Store The underlying store to wrap with caching cache_store : Store - The store to use for caching (can be any Store implementation) - max_age_seconds : int | None, optional - Maximum age of cached entries in seconds. None means no expiration. - Default is None. + The store to use for caching (can be any Store implementation that + supports deletes) + max_age_seconds : int or "infinity", optional + Maximum age of cached entries in seconds. The string "infinity" means + entries never expire. Default is "infinity". max_size : int | None, optional Maximum size of the cache in bytes. When exceeded, least recently used items are evicted. None means unlimited size. Default is None.