Expand description
The key-value store Ojak keeps its caches in: a backend the application picks.
What Ojak remembers between requests — remote public keys, the IDs of
activities already processed, which signature scheme a host accepts — is
a cache: losing it costs a refetch, never a fact. It lives in a
KvStore, pluggable as in Fedify: ojak-postgres keeps it in a table,
and MemoryKvStore keeps it in memory for tests and for servers with
one process.
A key is a list of segments, such as ["key", "https://a.example/users/bob#main-key"],
so that one store holds every kind of entry without their keys colliding.
A value is JSON, and may be set to expire.
Structs§
- KvError
- A failure in the store backend itself.
- Memory
KvStore - A
KvStorein memory.
Traits§
- KvStore
- A key-value store backend.