fix: implement separate cache for byte-range-requests#3710
fix: implement separate cache for byte-range-requests#3710d-v-b wants to merge 2 commits intozarr-developers:mainfrom
Conversation
|
closes #3690 |
|
@dsparber take a look and let me know if this works for your needs |
|
Looks great, thanks a lot! The double cache approach seems like a good trade-off. One small concern (maybe I overlooked it): Is there a way to limit the size of the in-memory cache for ranges? |
Ranges and full fetches both contribute to the cache size limit. So there shouldn't be a risk unbounded RAM usage specifically for range queries. |
This PR adds a support for byte-range caching to the experimental
CacheStore. Claude did all the heavy lifting here so we need to review carefully.Some design notes:
The dual-store design of the
CacheStorecomplicates caching range requests. I considered 3 options:f"{key}.{request type}.{request params}". Downside of this is potentially littering the cache (which might be the local file system) with non-zarr keys.I would love to hear other ideas / suggestions. Maybe we support all 3 options via a parameter on the cache store?