Adjust stale-caches and dont group read&unread notifs together (#2041)
* Dont group read & unread notifications together * Remove and reduce some stale cache times * Keep the staleTime on the post-feed * Bring back the load-bearing staletime on profile
This commit is contained in:
parent
c3e97fee1d
commit
fcd22d4ccb
14 changed files with 8 additions and 26 deletions
|
@ -1,13 +1,10 @@
|
|||
import {BskyAgent} from '@atproto/api'
|
||||
import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {STALE} from '#/state/queries'
|
||||
|
||||
export const RQKEY = (serviceUrl: string) => ['service', serviceUrl]
|
||||
|
||||
export function useServiceQuery(serviceUrl: string) {
|
||||
return useQuery({
|
||||
staleTime: STALE.HOURS.ONE,
|
||||
queryKey: RQKEY(serviceUrl),
|
||||
queryFn: async () => {
|
||||
const agent = new BskyAgent({service: serviceUrl})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue