Skip to content

Commit

Permalink
docs: Add cacheTime default (#3094)
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvein authored Dec 14, 2021
1 parent 128e578 commit f9077bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/pages/reference/useQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const result = useQuery({
- The time in milliseconds after data is considered stale. This value only applies to the hook it is defined on.
- If set to `Infinity`, the data will never be considered stale
- `cacheTime: number | Infinity`
- Defaults to `5 * 60 * 1000` (5 minutes)

This comment has been minimized.

Copy link
@P1X3L

P1X3L Dec 14, 2021

❤️ @Calvein thank you

- 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.
- If set to `Infinity`, will disable garbage collection
- `queryKeyHashFn: (queryKey: QueryKey) => string`
Expand Down

1 comment on commit f9077bc

@vercel
Copy link

@vercel vercel bot commented on f9077bc Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.