Expand description
Key-value persistence: in-memory stores synced to the file system, browser storage or kept memory-only depending on the environment. Key-value persistence.
A [Store] is a typed in-memory map that syncs its content to an optional
[Storage]: an embedded SQLite database on std targets, browser storage
on wasm (feature browser-cache), or nothing at all. [CacheOption]
decides whether the whole namespace is ingested at open or entries are
faulted in one key at a time.
Every cache is identified by a [Namespace], a /-separated string such
as autotune/0.11.0/cuda-0/matmul. On std targets all the namespaces of a
cache root share one database file (cubecl.db) and are told apart by a
column rather than by a directory tree. Entries are therefore looked up per
key, several processes can share a root safely through WAL, and shipping a
subset of them is a query away (see crate::bundle).
Re-exports§
pub use storage::*;
Modules§
- storage
- The writable half of persistence: where a namespace’s entries live.
Structs§
- Namespace
- Where a
Store’s entries live inside an environment: a/-separated location such asautotune/0.11.0/cuda-0/matmul. - Store
- A typed key-value store over an optional persistence
Storage: an embedded database on native targets, browser storage on wasm (featurebrowser-cache), or nothing at all. - Store
Options - Defines how to create a
Store.
Enums§
- Cache
Config - Cache location options.
- Cache
Option - How a
Storepopulates its in-memory map from its storage. - Store
Error - Error related to a
Store.
Traits§
- Store
Key - Trait to be implemented for store keys.
- Store
Value - Trait to be implemented for store values.