-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly purge server load cache (#8893)
fixes #8272 When going from a page with server load to a page without server load, the cache wasn't purged properly --------- Co-authored-by: Simon H <[email protected]>
- Loading branch information
1 parent
c9e491a
commit 1beb19c
Showing
8 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
fix: don't reuse previous server load cache when there's no server load function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...test/apps/basics/src/routes/load/server-data-reuse/with-changing-parent/+layout.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('./$types').LayoutServerLoad} */ | ||
export function load(input) { | ||
return { | ||
title: input.url.pathname | ||
}; | ||
} |
1 change: 1 addition & 0 deletions
1
...it/test/apps/basics/src/routes/load/server-data-reuse/with-changing-parent/+layout.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<slot /> |
7 changes: 7 additions & 0 deletions
7
...t/apps/basics/src/routes/load/server-data-reuse/with-changing-parent/no-load/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<p>Page without load</p> | ||
|
||
<pre>{JSON.stringify(data)}</pre> |
4 changes: 4 additions & 0 deletions
4
...s/src/routes/load/server-data-reuse/with-changing-parent/with-server-load/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('./$types').PageServerLoad} */ | ||
export function load() { | ||
return { server: true }; | ||
} |
8 changes: 8 additions & 0 deletions
8
...sics/src/routes/load/server-data-reuse/with-changing-parent/with-server-load/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script> | ||
/** @type {import('./$types').PageData} */ | ||
export let data; | ||
</script> | ||
|
||
<p>Page with server load</p> | ||
|
||
<pre>{JSON.stringify(data)}</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters