Refetch some data on an interval (#2114)
* Match refetch intervals to stale time * Lower refetch interval for own-profile
This commit is contained in:
parent
47771b9066
commit
a924df4dcd
5 changed files with 17 additions and 4 deletions
|
@ -28,8 +28,9 @@ export const preferencesQueryKey = ['getPreferences']
|
|||
|
||||
export function usePreferencesQuery() {
|
||||
return useQuery({
|
||||
staleTime: STALE.MINUTES.ONE,
|
||||
staleTime: STALE.SECONDS.FIFTEEN,
|
||||
structuralSharing: true,
|
||||
refetchInterval: STALE.SECONDS.FIFTEEN,
|
||||
queryKey: preferencesQueryKey,
|
||||
queryFn: async () => {
|
||||
const agent = getAgent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue