Skip to content

[v3] Caching from fsspec doesn't work with FSSpecStore #2988

@tasansal

Description

@tasansal

Zarr version

3.0.6

Numcodecs version

0.15.1

Python Version

3.13

Operating System

Mac

Installation

using uv to install in virtual environment

Description

We could initialize cached fsspec instances in Zarr v2 by passing protocol and storage options. This doesn't work in v3 anymore even though the cache gets initialized.

Steps to reproduce

import zarr

remote_store = "gs://<bucket>/<prefix>"  # example remote store

root = zarr.open_consolidated(f"simplecache::{remote_store}", storage_options={"simplecache": {"cache_storage": "./test_cache"}})

%time _ = root["array"][3600, 2048:4096]  # example read
  1. This gives store not being initialized with async warning
  2. The cache directory gets created as expected
  3. fs property of root.store shows the correct Cached fsspec instance
  4. Once reads are done, it always fetches from remote and doesn't use cache.

As I mentioned before, this works fine on v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions