diff --git a/backend/src/services/discord.ts b/backend/src/services/discord.ts index a2107fc..bf581fb 100644 --- a/backend/src/services/discord.ts +++ b/backend/src/services/discord.ts @@ -14,7 +14,7 @@ interface CacheEntry { expiresAt: number; } -const CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes +const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours const cache = new Map(); function getBotToken(): string | undefined { diff --git a/backend/src/services/entries.ts b/backend/src/services/entries.ts index 25297f8..6118bc8 100644 --- a/backend/src/services/entries.ts +++ b/backend/src/services/entries.ts @@ -120,8 +120,8 @@ async function fetchEntriesFromGitHub(jamSlug: string): Promise { // In-memory cache for GitHub-fetched entries const entriesCache: Map = new Map(); -const CACHE_TTL = 5 * 60 * 1000; // 5 minutes (slugs, frontmatter) -const CACHE_TTL_ACTIVE = 5 * 60 * 1000; // 5 minutes for latest jam entries +const CACHE_TTL = 24 * 60 * 60 * 1000; // 24 hours (slugs, frontmatter) +const CACHE_TTL_ACTIVE = 60 * 60 * 1000; // 1 hour for latest jam entries const CACHE_TTL_ARCHIVE = 7 * 24 * 60 * 60 * 1000; // 7 days for older jam entries /** Latest jam slug, updated by getJamSlugs(). */ diff --git a/spec/JUDGING.md b/spec/JUDGING.md index 8a61999..cccd529 100644 --- a/spec/JUDGING.md +++ b/spec/JUDGING.md @@ -126,7 +126,7 @@ Backend fetches entries from GitHub: https://raw.githubusercontent.com/dojoengine/game-jams/main/{slug}/entries.yaml ``` -Caching: 5-minute TTL in memory. This balances freshness with minimal GitHub API calls. +Caching: 1-hour TTL in memory. This balances freshness with minimal GitHub API calls. ## Pairwise Judging