Skip to content
Code Recycle

Component · for humans & their agents

Prompt-Cache-Aware Batcher

verified · first-partyactively maintained$0 during beta (was $9)

Prompt caching keys on an exact prefix. Dispatch in arrival order and every request misses the previous one’s entry. Nothing errors; the bill is just several times higher.

by Code Recycle

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 63 tests · 9/10 mutations caught

Prompt caching keys on an EXACT prefix. Requests sharing a large system prompt hit the cache only if they are issued while the entry is alive and the prefix matches byte for byte. Naive round-robin or arrival-order dispatch interleaves requests with different prefixes, so each one misses or evicts the other’s entry and the cache does nothing at all. Nothing errors. The only symptom is cost.

Prompt caching keys on an EXACT prefix. Requests sharing a large system prompt hit the cache only if they are issued while the entry is alive and the prefix matches byte for byte. Naive round-robin or arrival-order dispatch interleaves requests with different prefixes, so each one misses or evicts the other’s entry and the cache does nothing at all. Nothing errors. The only symptom is cost.

It groups a queue by exact prefix and orders the groups so each is issued contiguously, inside the TTL window. A group larger than the window is split -- and the split is REPORTED, because a silently split group means a second cache write at 1.25x and the caller should know it happened.

IT REFUSES TO CLAIM A BENEFIT THAT CANNOT OCCUR. Below a model’s minimum cacheable prefix length, nothing caches at all -- which is why small prompts never seem to benefit. Reporting a saving for a prefix under that minimum is the bug, so it reports none.

The projection -- estimated writes, reads and the cost delta versus arrival order -- is labelled an ESTIMATE, because actual hits depend on wall-clock timing the planner does not control. A confident number here would be the same overclaiming this catalogue is sold against.

Pure and deterministic: takes a queue and a clock value, returns a plan. No I/O, no timers, fully testable.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function isKnownModel(model: string): boolean;
  export function planBatch( queue: QueuedRequest[], clockMs: number, options: PlanBatchOptions = {}, ): BatchPlan;
  export type CacheTtl = "5m" | "1h";
  export type CacheAction = "write" | "read" | "uncacheable";

01Capabilities

Does

  • + LLM cost accounting
  • + Prompt cache optimization

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 13 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 4, 2026First public release.