From 6dfb2a232f89e96c6cca25430afecbce50d08a0f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 16 Nov 2023 17:28:50 -0600 Subject: Caching heuristics (#1938) * Tempfix profile load * First pass at staleTime --- src/state/queries/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/state/queries/index.ts') diff --git a/src/state/queries/index.ts b/src/state/queries/index.ts index ae3d1595c..affebb907 100644 --- a/src/state/queries/index.ts +++ b/src/state/queries/index.ts @@ -3,3 +3,14 @@ import {BskyAgent} from '@atproto/api' export const PUBLIC_BSKY_AGENT = new BskyAgent({ service: 'https://api.bsky.app', }) + +export const STALE = { + MINUTES: { + ONE: 1e3 * 60, + FIVE: 1e3 * 60 * 5, + }, + HOURS: { + ONE: 1e3 * 60 * 60, + }, + INFINITY: Infinity, +} -- cgit 1.4.1