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 Turso database (feature persistence) on a file
system natively and on OPFS in the browser, 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. All the namespaces of an environment
share one database file 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: a Turso database on native targets and in the browser (featurepersistence), 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.