Skip to content

docs: document the options of interceptors.cache() - #6050

Merged
metcoder95 merged 1 commit into
nodejs:mainfrom
qodelicious:docs-cache-interceptor-options
Oct 19, 2026
Merged

metcoder95 merged 1 commit into
nodejs:mainfrom
qodelicious:docs-cache-interceptor-options

Conversation

@qodelicious

Copy link
Copy Markdown
Contributor

This relates to...

Fixes #6012

Rationale

The interceptors.cache() docs point to CacheHandler.CacheOptions, a link that 404s, and the text below it sends readers to the CacheStore page, which doesn't list the options. This lists the accepted options in the same style as the other interceptors.

Changes

Replaced the opts entry of interceptors.cache() in docs/docs/api/Interceptors.md with the list of options (store, methods, cacheByDefault, type, origins) and their defaults. The options and defaults were checked against lib/interceptor/cache.js and types/cache-interceptor.d.ts.

Features

N/A

Bug Fixes

N/A (documentation only)

Breaking Changes and Deprecations

N/A

Status

@metcoder95
metcoder95 merged commit e34b872 into nodejs:main Oct 19, 2026
36 checks passed
@codecov-commenter

codecov-commenter commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (b777e40) to head (39bf3e1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6050   +/-   ##
=======================================
  Coverage   91.56%   91.57%           
=======================================
  Files         113      113           
  Lines       43839    43839           
=======================================
+ Hits        40143    40144    +1     
+ Misses       3696     3695    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
penberg added a commit to tursodatabase/turso that referenced this pull request Oct 28, 2026
…vascript' from app/dependabot

Bumps [undici](https://github.com/nodejs/undici) from 8.11.2 to 8.12.3.
<details> <summary>Release notes</summary> <p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p> <blockquote> <h2>v8.12.3</h2> <h2>What's
Changed</h2> <ul> <li>ci: use Python 3.14 for the WPT server on macOS by
<a href="https://github.com/mrityunjay-pandey"><code>@​mrityunjay-
pandey</code></a> in <a href="https://redirect.github.com/nodejs/undici/
pull/6029">nodejs/undici#6029</a></li> <li>build(deps-dev): bump
neostandard from 0.13.0 to 0.14.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/nodejs/undici/pull/6006">nodejs/
undici#6006</a></li> <li>build(deps-dev): bump eslint from 9.39.4 to
10.12.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a href="https://redirect.github.com/nodejs/undici/pull/5967">nodejs/
undici#5967</a></li> <li>docs: document the options of
interceptors.cache() by <a
href="https://github.com/qodelicious"><code>@​qodelicious</code></a> in
<a href="https://redirect.github.com/nodejs/undici/pull/6050">nodejs/und
ici#6050</a></li> <li>fix(h2): replace a connection that stops
responding after a stream timeout by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a hre
f="https://redirect.github.com/nodejs/undici/pull/6052">nodejs/undici#60
52</a></li> <li>fix(pool): keep caller async context for queued requests
by <a href="https://github.com/mcollina"><code>@​mcollina</code></a> in
<a href="https://redirect.github.com/nodejs/undici/pull/5982">nodejs/und
ici#5982</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a
href="https://github.com/qodelicious"><code>@​qodelicious</code></a>
made their first contribution in <a href="https://redirect.github.com/no
dejs/undici/pull/6050">nodejs/undici#6050</a></li> </ul> <p><strong>Full
Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v8
.12.2...v8.12.3">nodejs/undici@v8.12.2...v8.1
2.3</a></p> <h2>v8.12.2</h2> <h2>Security fixes</h2> <h3>High
severity</h3> <h4>Denial of service via TLS 1.2 certificate-changing
renegotiation</h4> <p><strong>CVE-2026-87018 · <a
href="https://github.com/nodejs/undici/security/advisories/GHSA-qrxm-
fqhp-jwvm">GHSA-qrxm-fqhp-jwvm</a></strong></p> <p>A malicious or
compromised HTTPS server could crash the Node.js process by initiating
TLS 1.2 renegotiation and presenting a different, CA-trusted certificate
whose hostname did not match the requested host. The resulting socket
error reached an assertion in undici's HTTP/1.1 and HTTP/2 connection
handling. This release handles post-connect certificate errors without
terminating the process.</p> <h4>TLS certificate validation bypass
through dropped <code>Agent</code> options</h4>
<p><strong>CVE-2026-109383 · <a href="https://github.com/nodejs/undici/s
ecurity/advisories/GHSA-2m5v-pch6-74hx">GHSA-2m5v-pch6-
74hx</a></strong></p> <p><code>Agent</code> used a JSON-based clone for
constructor options, which silently removed function-valued TLS options
such as <code>checkServerIdentity</code>. Applications relying on custom
certificate or public-key verification could therefore accept a
certificate that the callback was intended to reject. This release
preserves TLS options when creating per-origin dispatchers.</p>
<h4>Cache poisoning and cross-user disclosure through cross-origin
redirects</h4> <p><strong>CVE-2026-109829 · <a href="https://github.com/
nodejs/undici/security/advisories/GHSA-4w7w-5xrc-9h26">GHSA-4w7w-5xrc-
9h26</a></strong></p> <p>When an originless <code>Agent</code> combined
redirect and shared-cache interceptors as <code>compose(redirect(),
cache())</code>, a response from a cross-origin redirect could be stored
under the original URL. This could allow persistent cache poisoning or
disclosure of user-specific responses to later callers. This release
verifies the response origin before caching and preserves redirect-hop
cache-control policy.</p> <h4>Denial of service through excessive
<code>Content-Encoding</code> values</h4> <p><strong>CVE-2026-109869 ·
<a href="https://github.com/nodejs/undici/security/advisories/GHSA-
xjj6-f33q-929c">GHSA-xjj6-f33q-929c</a></strong></p> <p>A malicious HTTP
server could crash the Node.js process by returning more than five
content codings and closing the connection before sending the body.
Although <code>fetch()</code> rejected the response, an error from an
orphaned internal stream could remain unhandled. This release validates
the content-encoding chain before creating the body stream and aborts
oversized chains safely.</p> <h3>Medium severity</h3> <h4>Denial of
service through the <code>decompress</code> interceptor</h4>
<p><strong>CVE-2026-87029 · <a href="https://github.com/nodejs/undici/se
curity/advisories/GHSA-55wc-3pg8-jfw6">GHSA-55wc-3pg8-
jfw6</a></strong></p> <!-- raw HTML omitted --> </blockquote> <p>...
(truncated)</p> </details> <details> <summary>Commits</summary> <ul>
<li><a href="nodejs/undici@ff9cc5e8556f488c045
c884b4de367c5faed8522"><code>ff9cc5e</code></a> Bumped v8.12.3 (<a href=
"https://redirect.github.com/nodejs/undici/issues/6053">#6053</a>)</li>
<li><a href="nodejs/undici@0bbf614b81ecd9e6fff
c9d2edc5082d3c1b0b4bd"><code>0bbf614</code></a> fix(pool): keep caller
async context for queued requests (<a href="https://redirect.github.com/
nodejs/undici/issues/5982">#5982</a>)</li> <li><a href="https://github.c
om/nodejs/undici/commit/aa1eef17b816caba4b62514f6a38505cf6c60677"><code>
aa1eef1</code></a> fix(h2): replace a connection that stops responding
after a stream timeout (#...</li> <li><a href="https://github.com/nodejs
/undici/commit/e34b872c51034dd90a188352d0fefaea8f13d1b6"><code>e34b872</
code></a> docs: document the options of interceptors.cache() (<a href="h
ttps://redirect.github.com/nodejs/undici/issues/6050">#6050</a>)</li>
<li><a href="nodejs/undici@e8f34234d10febe285e
bc29c971c44c79220a123"><code>e8f3423</code></a> build(deps-dev): bump
eslint from 9.39.4 to 10.12.0 (<a href="https://redirect.github.com/node
js/undici/issues/5967">#5967</a>)</li> <li><a href="https://github.com/n
odejs/undici/commit/b777e40c486bbde395bfff66aecddb72cc95b67f"><code>b777
e40</code></a> build(deps-dev): bump neostandard from 0.13.0 to 0.14.0
(<a href="https://redirect.github.com/nodejs/undici/issues/6006">#6006</
a>)</li> <li><a href="nodejs/undici@43700ff9b5
f2e0b7f914f6a0169506f8d6b1accf"><code>43700ff</code></a> ci: use Python
3.14 for the WPT server on macOS (<a href="https://redirect.github.com/n
odejs/undici/issues/6029">#6029</a>)</li> <li><a href="https://github.co
m/nodejs/undici/commit/bb6cc0ae9b6827ed273ed5ba344148273629638f"><code>b
b6cc0a</code></a> Bumped v8.12.2 (<a href="https://redirect.github.com/n
odejs/undici/issues/6021">#6021</a>)</li> <li><a href="https://github.co
m/nodejs/undici/commit/b217373bb024cd93f85eb5b3ffd25684855f60f8"><code>b
217373</code></a> fix(websocket): bound automatic PONG writes under
backpressure</li> <li><a href="nodejs/undici@7
89ef26461c648480433846607154f52d74ec9ab"><code>789ef26</code></a>
fix(eventsource): bound retained SSE parser state</li> <li>Additional
commits viewable in <a href="https://github.com/nodejs/undici/compare/v8
.11.2...v8.12.3">compare view</a></li> </ul> </details> <br />

[![Dependabot compatibility score](https://dependabot-
badges.githubapp.com/badges/compatibility_score?dependency-
name=undici&package-manager=npm_and_yarn&previous-version=8.11.2&new-
version=8.12.3)](https://docs.github.com/en/github/managing-security-
vulnerabilities/about-dependabot-security-updates#about-compatibility-
scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)

---

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/tursodatabase/turso/network/alerts).

</details>

Closes #10970
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.

document: Broken link for CacheHandler.CacheOptions

4 participants