Open
Description
Affected URL(s)
https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch
Description of the problem
The docs say that global.fetch
is a Browser-compatible implementation of the fetch() function, but it's unclear what that means with respect to caching.
Calling fetch('https://example.com')
twice doesn't result in any caching, despite a cache-control
response header existing. Similarly calling fetch('https://example.com', {cache: 'force-cache'})
makes two separate requests as well.
Is there a plan to implement caching, or a recommended way for end-users to provide caching? Is the cache
property on RequestInit
supposed to do something?