Skip to content

types: correct the cache store @default tags - #5826

Open
hxperl wants to merge 1 commit into
nodejs:mainfrom
hxperl:types-cache-store-defaults
Open

hxperl wants to merge 1 commit into
nodejs:mainfrom
hxperl:types-cache-store-defaults

Conversation

@hxperl

@hxperl hxperl commented Sep 15, 2026

Copy link
Copy Markdown

types/cache-interceptor.d.ts gives @default Infinity for four cache store options that are bounded. The implementation and docs/docs/api/CacheStore.md agree with each other; only the .d.ts disagrees.

// lib/cache/memory-cache-store.js
#maxCount = 1024
#maxSize = 104857600      // 100MB
#maxEntrySize = 5242880   // 5MB

A 6 MiB response is silently not cached under defaults, which the types say cannot happen. Corrected the four tags to match.

MemoryCacheStoreOpts documents maxCount, maxSize and maxEntrySize as
Infinity, and SqliteCacheStoreOpts documents maxEntrySize as Infinity.
The implementation and docs/docs/api/CacheStore.md both give finite
defaults.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011e7REh3NDrdszg2xJdd5Qy

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant