@leejpsd/nextjs-cache-handler 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +8 -7
- package/dist/cli/index.cjs +12 -3
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +12 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/incremental/index.cjs +4 -1
- package/dist/incremental/index.cjs.map +1 -1
- package/dist/incremental/index.js +4 -1
- package/dist/incremental/index.js.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/seed/index.cjs +12 -3
- package/dist/seed/index.cjs.map +1 -1
- package/dist/seed/index.d.cts +7 -0
- package/dist/seed/index.d.ts +7 -0
- package/dist/seed/index.js +12 -3
- package/dist/seed/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1605,7 +1605,10 @@ function extractTagsFromValue(value, ctx) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
function isTagStateExpired(state, lastModified, isFetch) {
|
|
1607
1607
|
if (!state || typeof lastModified !== "number") return false;
|
|
1608
|
-
if (typeof state.expired === "number" && state.expired >= lastModified)
|
|
1608
|
+
if (typeof state.expired === "number" && state.expired >= lastModified) {
|
|
1609
|
+
if (typeof state.stale !== "number") return true;
|
|
1610
|
+
if (state.expired <= Date.now()) return true;
|
|
1611
|
+
}
|
|
1609
1612
|
if (isFetch && typeof state.stale === "number" && state.stale >= lastModified) return true;
|
|
1610
1613
|
return false;
|
|
1611
1614
|
}
|