Skip to content

Commit f9077bc

Browse files
authored
docs: Add cacheTime default (TanStack#3094)
1 parent 128e578 commit f9077bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/src/pages/reference/useQuery.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const result = useQuery({
9696
- The time in milliseconds after data is considered stale. This value only applies to the hook it is defined on.
9797
- If set to `Infinity`, the data will never be considered stale
9898
- `cacheTime: number | Infinity`
99+
- Defaults to `5 * 60 * 1000` (5 minutes)
99100
- The time in milliseconds that unused/inactive cache data remains in memory. When a query's cache becomes unused or inactive, that cache data will be garbage collected after this duration. When different cache times are specified, the longest one will be used.
100101
- If set to `Infinity`, will disable garbage collection
101102
- `queryKeyHashFn: (queryKey: QueryKey) => string`

0 commit comments

Comments
 (0)