pub struct IRCache {
pub node_type: &'static str,
pub source_line: u32,
pub source_column: u32,
pub name: String,
pub backend: String,
pub ttl: Option<String>,
pub key_params: Vec<String>,
pub default_policy: bool,
pub apply_to_effects: Vec<String>,
pub invalidate_on: Vec<String>,
}Expand description
§Fase 85.b — compiled cache policy. The checker (§85.c) re-derives the
same laws at the deploy gate (CacheSoundness), so an IR that reaches the
runtime is already proven sound (one default max, non-pure ⇒ finite ttl,
references resolve). Every optional field is skip_serializing_if so a
bundle using cache only pays IR bytes for what it declares, and a bundle
with no cache never emits a caches key (IR-SHA stable, §76.d).
Fields§
§node_type: &'static str§source_line: u32§source_column: u32§name: String§backend: String"redis" | "in_process"; empty ⇒ runtime default (in_process).
ttl: Option<String>Duration literal ("10s") — same string-carries-the-unit convention as
cors.max_age. None ⇒ cache-forever (sound only for a pure cache).
key_params: Vec<String>The parameter-name subset forming the key; empty ⇒ all bound params.
default_policy: booltrue ⇒ auto-covers every eligible tool (at most one per module).
apply_to_effects: Vec<String>Effect classes this cache memoises; empty ⇒ ["pure"].
invalidate_on: Vec<String>Channel names whose emit flushes this cache’s namespace.