diff --git a/src/queryCache.js b/src/queryCache.js index a6c05fbc05..62ed629410 100644 --- a/src/queryCache.js +++ b/src/queryCache.js @@ -244,6 +244,9 @@ export function makeQueryCache() { } query.scheduleGarbageCollection = () => { + if (query.config.cacheTime === Infinity) { + return + } dispatch({ type: actionMarkGC }) query.cacheTimeout = setTimeout( () => {