Add a few quick wins for caching

This commit is contained in:
Nate Kelley 2025-08-08 09:24:14 -06:00
parent e9fb9f0199
commit b95f952166
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
3 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import type { UseSupabaseUserContextType } from '@/lib/supabase';
import { BusterAssetsProvider } from './Assets/BusterAssetsProvider';
import { AppLayoutProvider } from './BusterAppLayout';
import { BusterReactQueryProvider } from './BusterReactQuery/BusterReactQueryAndApi';
import { BusterWebSocketProvider } from './BusterWebSocket';
import { BusterNewChatProvider } from './Chats';
import { BusterPosthogProvider } from './Posthog';
import { RoutePrefetcher } from './RoutePrefetcher';

View File

@ -6,7 +6,7 @@ import packageJson from '../../../package.json';
const buster = packageJson.version;
export const PERSIST_TIME = 1000 * 60 * 60 * 24 * 7; // 7 days
export const PERSIST_TIME = 1000 * 60 * 60 * 24 * 3; // 3 days
export const PERSISTED_QUERIES = [queryKeys.slackGetChannels.queryKey].map(hashKey);

View File

@ -1,4 +1,4 @@
export const PREFETCH_STALE_TIME = 1000 * 10; // 10 seconds
export const ERROR_RETRY_DELAY = 1 * 1000; // 1 second delay after error
export const GC_TIME = 1000 * 60 * 60 * 24 * 3; // 24 hours - matches persistence duration
export const GC_TIME = 1000 * 60 * 60 * 24 * 3; // 3 days - matches persistence duration
export const USER_CANCELLED_ERROR = new Error('User cancelled');