Class ToolCacheProps

Assembly: redb.Route.Llm.dll

Cached deterministic tool output. The key is built by Tools/ToolCacheKey.StoreKey and shaped
persist:{toolName}:{hash} — the hash folds in the tool name, the resolved endpoint URI, the
governance-policy fingerprint, the caller fingerprint and the tool input JSON, so an entry written
while a tool was laxer can never answer a call made after the tool got stricter. Only
Persist-policy entries reach this store; None and Memoize never do (the latter
stays in the in-process memo: layer).

The key lives on the value_string column of _objects (partial index on
PostgreSQL/SQLite; no index on MSSQL), not in props — lookups are server-side via
WhereRedb(o => o.ValueUnique == RedbUniqueKey.Normalize(key)); the key also rides,
normalized, in value_unique (per-scheme unique race barrier).
The store honours lazily — entries past expiry are dropped on read.

[RedbScheme("LLM Tool Cache")]
public class ToolCacheProps

Inheritance

Object→ToolCacheProps

Properties

CreatedAtUtc

When the entry was created.

public DateTimeOffset CreatedAtUtc { get; set; }

ExpiresAtUtc

Optional expiry; null = no TTL.

public DateTimeOffset? ExpiresAtUtc { get; set; }

OutputJson

JSON-serialized tool output.

public string OutputJson { get; set; }

ToolName

Optional tool name for scoped invalidation / metrics. Not written today — the tool name already

public string? ToolName { get; set; }