Skip to content

Commit b810686

Browse files
authored
accept infinite cacheTime (#349)
1 parent 7cabf53 commit b810686

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/queryCache.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ export function makeQueryCache() {
244244
}
245245

246246
query.scheduleGarbageCollection = () => {
247+
if (query.config.cacheTime === Infinity) {
248+
return
249+
}
247250
dispatch({ type: actionMarkGC })
248251
query.cacheTimeout = setTimeout(
249252
() => {

0 commit comments

Comments
 (0)