1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! 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`]).
/// The writable half of persistence: where a namespace's entries live.
pub use *;
pub use Namespace;
pub use *;
/// `SQLite` persistence: the database file shared by every namespace of a
/// cache root.
pub use ;
/// Browser storage (IndexedDB).
pub
/// Cache root location selection.
///
/// Available wherever there is a file system, not only when the `SQLite`
/// backend is compiled in: the root is what names an environment on disk, and
/// [`crate::environment`] exposes it independently of how entries are stored.
pub use CacheConfig;
/// The database-backed storage serving `namespace` in the active
/// environment, degrading to process-wide memory when the database can't be
/// opened.
pub