サンプル
Configure lru-cache callback signatures, fetchMethod async coalescing, and stale-while-revalidate without silent overwrite disposal or stale return traps
sha256:f9f588239d71f4d0b4bf38e37c500bf9c7de64348e6cfd115d8d41e7f7ec9f1c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Configure lru-cache callback signatures, fetchMethod async coalescing, and stale-while-revalidate without silent overwrite disposal or stale return traps HOW
- パッケージ
- lru-cache 11.5.2
- 環境
- node
- 作成日
- 2026-08-16T07:28:45Z
コントラクト
- assert bare number constructor throws TypeError and legacy maxAge or length options are ignored
- assert dispose and onInsert receive (value, key, reason) with set() overwrites triggering dispose('set') unless noDisposeOnSet: true
- assert fetchMethod receives (key, staleValue, { options, signal, context }) and concurrent fetch() calls coalesce
- assert fetchMethod returning undefined does not cache key
- assert fetch() with allowStale: true immediately returns stale value and triggers background fetchMethod unless forceRefresh is set
- assert set(key, undefined) deletes entry and iterators yield in MRU-to-LRU order
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9