You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instantiate a new innertube instance with the universal cache Innertube.create({ cache: new UniversalCache(true) }) in the fetch function before rendering the hello world
npm run dev and visit the page
Failure Logs
X [ERROR] TypeError: Invalid URL: innertube_session_data
at Cache.<anonymous>
(file:///D:/Code/yt-event-reminder/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/platform/cf-worker.ts:26:34)
at Generator.next (<anonymous>)
at fulfilled
(file:///D:/Code/yt-event-reminder/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.es6.mjs:118:56)
Expected behavior
Cache put and get calls work
Current behavior
It fails trying to retrieve session data from cache
Version
Default
Anything else?
The worker cache is designed to cache http responses for a given requests. The docs specify that if a string is passed, it is interpreted as a url. Therefore the key arg must be a url. It then fails trying to retrieve inntertube_session_data from cache, which isn't a url.
The request passed is a method other than GET.
The response passed has a status of 206 Partial Content.
The response passed contains the header Vary: . The value of the Vary header is an asterisk (). Refer to the Cache API specification for more information.
It's might be possible to simply convert the key into a valid url, but this is not what it was designed to do (and the docs mention more limitations). A KV adapter would be more suited
Checklist
I am running the latest version.
I checked the documentation and found no answer.
I have searched the existing issues and made sure this is not a duplicate.
I have provided sufficient information.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
npm create cloudflare
youtuvei.js/cf-worker
Innertube.create({ cache: new UniversalCache(true) })
in the fetch function before rendering the hello worldnpm run dev
and visit the pageFailure Logs
Expected behavior
Cache put and get calls work
Current behavior
It fails trying to retrieve session data from cache
Version
Default
Anything else?
The worker cache is designed to cache http responses for a given requests. The docs specify that if a string is passed, it is interpreted as a url. Therefore the
key
arg must be a url. It then fails trying to retrieveinntertube_session_data
from cache, which isn't a url.From the docs https://developers.cloudflare.com/workers/runtime-apis/cache/#cache:
It's might be possible to simply convert the key into a valid url, but this is not what it was designed to do (and the docs mention more limitations). A KV adapter would be more suited
Checklist
The text was updated successfully, but these errors were encountered: