Skip to content
10 changes: 10 additions & 0 deletions fizarrita/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ Cache keys use the format `store_N:/array/path:c/0/1/2`. A `WeakMap`-based
store ID ensures keys are unique across store instances, so a single cache can
safely be shared across multiple arrays and stores.

The array metadata read and the chunk-shape probe are memoised per
(store, array path) — both are immutable for the lifetime of an array — so
only the first `getWorker` call on an array touches the store for them. A
repeat read served entirely from a warm cache performs zero store requests.
Concurrent calls on a cold array share one resolution. Store options in `opts`
(headers, credentials, …) reach those reads too, with one exception: an
`AbortSignal` governs only the calling read's wait, never the shared
resolution — aborting one caller rejects it promptly without failing the others
that joined it, and the result still lands for the next read.

### LRU / bounded caches

For bounded memory, pass any LRU cache that implements the same `get`/`set`
Expand Down
Loading
Loading