Skip to main content

decide

Function decide 

Source
pub fn decide(mode: Mode, settings: Settings) -> Decision
Expand description

Combine the per-query Mode with deployment Settings to get the effective behaviour for this call.

Rules:

  • NOCACHE always wins (explicit user opt-out).
  • CACHE TTL t always wins when present (explicit user opt-in; the deployment toggle does NOT gate per-query opt-in, only the silent default).
  • Default + enabled=true + default_ttl=Some(t) → use, ttl=t.
  • Default + anything else → bypass.