Traffic reduction and tuned caching strats (#2215)
* Update the feed to only check latest on focus after 30s, but to do a full reset on focus after 1 hour to avoid very stale data * Remove the isFeedPublic query * Fix: avoid double next-page fetches * Reduce some poll intervals to reduce server load * Guard against double-fires of fetchNextPage * Reduce polling on blurred screens
This commit is contained in:
parent
dd074371cf
commit
2a712630b4
8 changed files with 83 additions and 151 deletions
|
@ -35,9 +35,7 @@ export function useProfileQuery({did}: {did: string | undefined}) {
|
|||
// if you remove it, the UI infinite-loops
|
||||
// -prf
|
||||
staleTime: isCurrentAccount ? STALE.SECONDS.THIRTY : STALE.MINUTES.FIVE,
|
||||
refetchInterval: isCurrentAccount
|
||||
? STALE.SECONDS.THIRTY
|
||||
: STALE.MINUTES.FIVE,
|
||||
refetchInterval: STALE.MINUTES.FIVE,
|
||||
queryKey: RQKEY(did || ''),
|
||||
queryFn: async () => {
|
||||
const res = await getAgent().getProfile({actor: did || ''})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue