Skip to content
Code Recycle

Component · for humans & their agents

HTTP Cache Semantics (RFC 9111)

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

A response marked private, stored in a shared cache, serves one user's page to another.

by ringbuffer · Code Recycle admin

Get it free — beta

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

Verified: 169 tests

Decides whether a response may be stored, whether a shared cache may keep it, and for how long -- with the rule that drove each decision.

Decides whether a response may be stored, whether a shared cache may keep it, and for how long -- with the rule that drove each decision.

THE SILENT FAILURE. Caching bugs do not throw. They serve the WRONG USER'S DATA, or serve stale content long after it changed, and both look like the system working. A response with Cache-Control private stored in a shared cache leaks one user's page to another -- the most expensive bug in this category and invisible until somebody reports seeing another person's name. A missing Vary on Authorization does the same by a different route.

Heuristic freshness is the quiet one: a response with no explicit expiry MAY be cached using a heuristic per RFC 9111, so an endpoint the author never intended to be cached gets cached anyway, and the author never knew it was a decision.

It FAILS CLOSED TOWARD NOT CACHING. Where the specification permits heuristic freshness it reports that a heuristic WOULD apply and what it would be, rather than quietly adopting it. An unparseable or contradictory header set is treated as not cacheable and reported, never resolved by picking the more permissive reading. Every rule cites its RFC 9111 section, and every decision carries the directive that drove it.

It computes decisions from headers you supply. It is not an HTTP client and stores nothing.

VERIFIED: 169 tests. Every mutation was observed FAILING before the source was restored -- a test never seen to fail is a decoration. Independently reviewed by a verifier whose job was to find what is wrong, not to agree.

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 parseAgeHeader(headers: HeaderMap | undefined): number | null;
  export function computeAge( responseHeaders: HeaderMap | undefined, now: number | Date, responseTime: number | Date, ): AgeResult;
  export function tokenizeCacheControl(raw: string): CacheDirectiveEntry[];
  export function resolveSingle( entries: CacheDirectiveEntry[], name: string, field: string, issues: ParseIssue[], ): ResolvedSingle;
  export function resolveDeltaSecondsDirective( entries: CacheDirectiveEntry[], name: string, field: string, issues: ParseIssue[], ): ResolvedDeltaSeconds;
  export function resolveQualifiedFlag( entries: CacheDirectiveEntry[], name: string, field: string, issues: ParseIssue[], ): ResolvedQualifiedFlag;
  export function hasFlag(entries: CacheDirectiveEntry[], name: string): boolean;
  export function parseResponseCacheControl( raw: string | null, issues: ParseIssue[], ): ResponseDirectives;
  export function parseRequestCacheControl( raw: string | null, _issues: ParseIssue[], ): RequestDirectives;
  export function evaluateCacheability( request: CacheRequest, response: CacheResponse, options: EvaluateOptions = {}, ): CacheDecision;
  export function getHeader(headers: HeaderMap | undefined, name: string): string | null;
  export function hasHeader(headers: HeaderMap | undefined, name: string): boolean;
  export type HeaderMap = Record<string, string | string[] | undefined>;
  export type CacheType = "shared" | "private";

01Capabilities

Does

  • + Reliability

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 24 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.