-
Notifications
You must be signed in to change notification settings - Fork 155
Feat: Composable cache #820
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
Feat: Composable cache #820
Conversation
|
commit: |
00f043d
to
b355d74
Compare
d453e0c
to
48c5da6
Compare
b355d74
to
beac4cf
Compare
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.
LGTM 👍
Could you please add a changeset mentioning the breaking changes
cacheKey, | ||
"composable", | ||
); | ||
if (!result || !result.value?.value) { |
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.
if (!result || !result.value?.value) { | |
if (!result?.value?.value) { |
@@ -15,19 +15,49 @@ export function compileCache( | |||
) { | |||
const { config } = options; | |||
const ext = format === "cjs" ? "cjs" : "mjs"; | |||
const outFile = path.join(options.buildDir, `cache.${ext}`); | |||
const compiledCacheFile = path.join(options.buildDir, `cache.${ext}`); | |||
const compiledComposableCacheFile = path.join( |
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.
nits:
- update the function comments line 6
- move
const compiledComposableCacheFile
to l 52
versions: ">=15.3.0", | ||
field: { | ||
pathFilter: getCrossPlatformPathRegex( | ||
String.raw`(server/chunks/.*\.js|.*\.runtime\..*\.js|use-cache/use-cache-wrapper\.js)$`, |
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.
nit: leading .*
should not be needed
String.raw`(server/chunks/.*\.js|.*\.runtime\..*\.js|use-cache/use-cache-wrapper\.js)$`, | |
String.raw`(server/chunks/.*\.js|\.runtime\..*\.js|use-cache/use-cache-wrapper\.js)$`, |
48c5da6
to
ade16e1
Compare
Oops i created this branch on my fork, i'll need to recreate a new PR. |
Add basic support for Composable cache.
This PR wil introduce breaking change to the incremental cache and tag cache typings.
Depends on #833