Skip to content

Commit

Permalink
increase state and cache time
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev committed Jan 10, 2024
1 parent d042fc8 commit e935f50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export function Page() {

const { data: tezosDocumentations } = useQuery(
['tezosOpenAPI'],
fetchGithubObjects
fetchGithubObjects,
{
cacheTime: 1000 * 60 * 60 * 24,
staleTime: 1000 * 60 * 60 * 24,
}
)

const selected = tezosDocumentations?.find((x) =>
Expand All @@ -29,6 +33,8 @@ export function Page() {
['documentation', url],
() => fetchDocumentation(url!, endpoint, network).then((data) => data),
{
cacheTime: 1000 * 60 * 60 * 24,
staleTime: 1000 * 60 * 60 * 24,
enabled: !!url,
}
)
Expand Down

0 comments on commit e935f50

Please sign in to comment.