deno
4e1d1863 - fix(cache): implement Cache.prototype.keys()

Commit
207 days ago
fix(cache): implement Cache.prototype.keys() PR #33275 added CacheStorage.keys() but the Cache.keys() instance method was never wired up — cache.keys is undefined today. This adds the spec-compliant implementation: - New op_cache_keys op returns request keys for a cache, optionally filtered to a single URL (honoring the cached response's Vary header). - Sqlite backend lists entries from request_response_list in insertion order; LSC backend returns KeysNotSupported (no list endpoint on the shard). - JS-side Cache.prototype.keys() reconstructs Request objects from the returned (url, headers) pairs. - New unit tests cover empty/populated caches, URL/Request/string inputs, fragment stripping, non-GET filter, post-delete state, and Vary header behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
References
Author
Parents
Loading