-
Notifications
You must be signed in to change notification settings - Fork 91
fix: support segment data in cache entries #3093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📊 Package size report 0.04%↑
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarity - we have to use JSON serializable primitives for our storage in blobs, hence why we need to swap between Map->Record and Buffer->Base64 string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note here - I typed meta (see line 80) above, and because headers is typed as OutgoingHttpHeaders (and not Record<string,string>) it required some additional type guard here to satisfy type checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is terrible (stitching type from different next versions, but if I just tried to use types for newer version, all hell broke lose, so this, while awful, felt like only reasonable option without getting stuck in fixing bunch of types
Uh oh!
There was an error while loading. Please reload this page.
Description
For
clientSegmentCachesupport.Tests
Mainly relies on vercel/next.js tests like https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts
This is experimental feature, we will look to maybe some of our tests in the future