Skip to content

Commit bceb358

Browse files
committedMar 2, 2024
fix backcache storing invalidated values
1 parent 5ac8ff5 commit bceb358

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎.changeset/short-kiwis-remain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
fix backcache storing invalidated values

‎src/data/cache.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ export function cache<T extends (...args: any) => any>(fn: T, name: string): Cac
9494

9595
if (
9696
cached &&
97+
cached[0] &&
9798
(isServer ||
9899
intent === "native" ||
99-
(cached[0] && cached[3].count) ||
100+
cached[3].count ||
100101
Date.now() - cached[0] < PRELOAD_TIMEOUT)
101102
) {
102103
if (tracking) {

0 commit comments

Comments
 (0)
Please sign in to comment.