Skip to main content

Crate origin_storage

Crate origin_storage 

Source
Expand description

Local storage: cache, read models, sync metadata, settings (ADR-0008).

External services stay Source of Truth. Deleting the local store must never lose user data.

Storage is deliberately dumb persistence — it stores and returns records as given. Expiry is enforced one layer up, by Cache, so that every backend behaves identically regardless of what it can express natively.

Modules§

namespace
The storage namespace convention (ADR-0019).

Structs§

Cache
Typed, TTL-aware access to Storage.
MemoryStorage
Non-persistent storage for tests and headless runs.
Record
A stored value plus its cache metadata. value is JSON text.
StorageKey
Addresses one record. The namespace groups records that are invalidated together, e.g. github.notifications.

Traits§

Storage
Persistence for cache entries, read models and local state.