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
//! [`Cache`] port — best-effort `sv:{sub}` cache.
use Duration;
use async_trait;
/// Best-effort cache of `sv:{sub}` values.
///
/// Promoted to the SDK in Phase 11.Z from chat-auth's private
/// `SessionVersionCache` trait (§3 Row 6 "replace, don't layer"). The
/// shape is identical: `get` returns `None` on miss OR transient cache
/// error; the [`super::CompositeEpochRevocation`] composer falls
/// through to its [`super::Fetcher`] in either case, so `Cache` impls
/// don't expose error variants. `set` is best-effort and swallows
/// failures internally — a failed write only means the next call will
/// fetch again.
///
/// `key` is the full `sv:{sub}` form (built via
/// [`super::sv_cache_key`]) so the SDK port matches the canonical
/// PAS↔consumer shared-cache contract documented in
/// `STANDARDS_SHARED_CACHE.md` §3.1.
///
/// ## Implementations
///
/// - [`super::InProcessTtlCache`] — opinionated per-pod TTL map; default
/// wiring for RCW/CTW (Slice 4/5).
/// - chat-auth-internal — KVRocks-backed reader (kept consumer-side
/// because it depends on `ppoppo-kvrocks`, which is not in the SDK
/// feature graph).
/// - 11.AB+ — SDK ships a KVRocks-backed `Cache` once
/// `KVROCKS_URL` ACL extends to RCW/CTW.