@rangojs/router 0.0.0-experimental.debug-cache-2383ca26 → 0.0.0-experimental.debug-cache-fix
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/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/src/cache/cache-scope.ts +10 -7
package/dist/vite/index.js
CHANGED
|
@@ -1745,7 +1745,7 @@ import { resolve } from "node:path";
|
|
|
1745
1745
|
// package.json
|
|
1746
1746
|
var package_default = {
|
|
1747
1747
|
name: "@rangojs/router",
|
|
1748
|
-
version: "0.0.0-experimental.debug-cache-
|
|
1748
|
+
version: "0.0.0-experimental.debug-cache-fix",
|
|
1749
1749
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1750
1750
|
keywords: [
|
|
1751
1751
|
"react",
|
package/package.json
CHANGED
package/src/cache/cache-scope.ts
CHANGED
|
@@ -349,19 +349,22 @@ export class CacheScope {
|
|
|
349
349
|
);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
// For document requests: only cache if
|
|
353
|
-
//
|
|
352
|
+
// For document requests: only cache if layout segments have components
|
|
353
|
+
// (complete render). Parallel and route segments may legitimately have
|
|
354
|
+
// null components — UI-less @meta parallels return null, and void route
|
|
355
|
+
// handlers produce null when the UI lives in parallel slots/layouts.
|
|
356
|
+
// Partial requests always allow null components (client already has them).
|
|
354
357
|
if (!isPartial) {
|
|
355
|
-
const
|
|
356
|
-
(s) => s.component
|
|
358
|
+
const hasIncompleteLayouts = nonLoaderSegments.some(
|
|
359
|
+
(s) => s.component === null && s.type === "layout",
|
|
357
360
|
);
|
|
358
|
-
if (
|
|
361
|
+
if (hasIncompleteLayouts) {
|
|
359
362
|
if (INTERNAL_RANGO_DEBUG) {
|
|
360
363
|
const nullSegments = nonLoaderSegments
|
|
361
|
-
.filter((s) => s.component === null)
|
|
364
|
+
.filter((s) => s.component === null && s.type === "layout")
|
|
362
365
|
.map((s) => s.id);
|
|
363
366
|
debugCacheLog(
|
|
364
|
-
`[CacheScope] waitUntil: SKIPPED (
|
|
367
|
+
`[CacheScope] waitUntil: SKIPPED (incomplete layouts: ${nullSegments.join(", ")}) for ${key}`,
|
|
365
368
|
);
|
|
366
369
|
}
|
|
367
370
|
return;
|