Browse Source

feat(12-01): extend model cache TTL to 1 hour

- Changed DEFAULT_TTL from 10 minutes to 60 minutes
- Reduces API calls to provider model listing endpoints
- Models don't change frequently, longer TTL is appropriate
handoff-20260429-1057
shrimbly 6 months ago
parent
commit
55a905b926
  1. 6
      src/lib/providers/cache.ts

6
src/lib/providers/cache.ts

@ -5,7 +5,7 @@
* Reduces API calls to external providers by caching results with TTL. * Reduces API calls to external providers by caching results with TTL.
* *
* Features: * Features:
* - 10-minute default TTL * - 1-hour default TTL
* - Per-provider cache keys * - Per-provider cache keys
* - Optional search query in cache key * - Optional search query in cache key
* - Manual invalidation support * - Manual invalidation support
@ -25,9 +25,9 @@ interface CacheEntry<T> {
} }
/** /**
* Default cache TTL: 10 minutes * Default cache TTL: 1 hour
*/ */
const DEFAULT_TTL = 10 * 60 * 1000; const DEFAULT_TTL = 60 * 60 * 1000;
/** /**
* In-memory cache storage * In-memory cache storage

Loading…
Cancel
Save