docs(desktop): update users-batch freshness comments to 10 minutes

The B6 change raised the per-pubkey entry check and query staleTime in
useUsersBatchQuery from 60s to 10 minutes; two comments still described
the 60s window. Comments only.

Co-authored-by: Meli <5aaa86bce934fc3445fc254aab560a40923f10252f92107e665073dede0e04d3@buzz.block.builderlab.xyz>
Signed-off-by: Meli <5aaa86bce934fc3445fc254aab560a40923f10252f92107e665073dede0e04d3@buzz.block.builderlab.xyz>
This commit is contained in:
Meli
2026-08-22 15:38:08 -04:00
parent 8133d70bb3
commit 0c492366d6

View File

@@ -284,8 +284,8 @@ export function useUserProfileQuery(pubkey?: string) {
// Per-pubkey resolution cache backing `useUsersBatchQuery`'s delta fetch. // Per-pubkey resolution cache backing `useUsersBatchQuery`'s delta fetch.
// `summary: null` records a relay-confirmed miss so unknown pubkeys aren't // `summary: null` records a relay-confirmed miss so unknown pubkeys aren't
// re-requested every page. Entries older than the hook's 60s staleTime are // re-requested every page. Entries older than the hook's 10-minute staleTime
// treated as unresolved and refetched. // are treated as unresolved and refetched.
export type UsersBatchEntry = { export type UsersBatchEntry = {
summary: UserProfileSummary | null; summary: UserProfileSummary | null;
fetchedAt: number; fetchedAt: number;
@@ -301,7 +301,8 @@ export const usersBatchEntryKey = (pubkey: string) => [
* run re-fetches these profiles from the relay. Must be called anywhere a * run re-fetches these profiles from the relay. Must be called anywhere a
* specific profile (or a containing `users-batch` query) is invalidated — * specific profile (or a containing `users-batch` query) is invalidated —
* otherwise the re-run resolves from the still-fresh-looking entry and * otherwise the re-run resolves from the still-fresh-looking entry and
* renders the stale name/avatar for up to the entry's 60s freshness window. * renders the stale name/avatar for up to the entry's 10-minute freshness
* window.
* Synchronous, so callers can evict before awaiting aggregate invalidations. * Synchronous, so callers can evict before awaiting aggregate invalidations.
*/ */
export function evictUsersBatchEntries( export function evictUsersBatchEntries(