L1 · the prompt-cache contract (08). The SDK owns ALL per-provider marker
placement; the engine owns a stable cache identity and forwards an opaque
passthrough map {:enabled? :ttl :scope-id} on every request.
L1 · the prompt-cache contract (08). The SDK owns ALL per-provider marker
placement; the engine owns a stable cache identity and forwards an opaque
passthrough map `{:enabled? :ttl :scope-id}` on every request.(build-cache-opts view cfg)(build-cache-opts view cfg {:keys [dynamic-request?]})The opaque passthrough attached to every adapter request (05 §4). The root agent loop scopes to the :agent purpose. When a request carries dynamic per-turn prompt material, cache only the stable system breakpoint on system-and-tail providers; dynamic prompt text must not become a tail cache anchor.
The opaque passthrough attached to every adapter request (05 §4). The root agent loop scopes to the :agent purpose. When a request carries dynamic per-turn prompt material, cache only the stable system breakpoint on system-and-tail providers; dynamic prompt text must not become a tail cache anchor.
(build-leaf-cache-opts caller-cache-id cfg)The opaque passthrough for a LEAF provider call (Phase 3, 08 §4). Scopes to the :leaf purpose under the CALLER session's cache-id (leaves run inside the caller's session state) — kept for symmetry; leaf prompts usually sit below the provider's cache minimum, so it is near a no-op.
The opaque passthrough for a LEAF provider call (Phase 3, 08 §4). Scopes to the :leaf purpose under the CALLER session's cache-id (leaves run inside the caller's session state) — kept for symmetry; leaf prompts usually sit below the provider's cache minimum, so it is near a no-op.
(cache-id session)A STABLE session identity, separate from :session/id. Defaults to the logical session id; preserved across resume/fork (cache affinity); fresh per child.
A STABLE session identity, separate from :session/id. Defaults to the logical session id; preserved across resume/fork (cache affinity); fresh per child.
(scope-id cid purpose)Deterministic, purpose-scoped digest derived from cache-id (purpose ∈ #{:agent :leaf}). Phase 1 uses only :agent (root) scope (08 §4).
Deterministic, purpose-scoped digest derived from cache-id (purpose ∈
#{:agent :leaf}). Phase 1 uses only :agent (root) scope (08 §4).cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |