Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/src/services/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, CacheEntry>();

function getBotToken(): string | undefined {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/services/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ async function fetchEntriesFromGitHub(jamSlug: string): Promise<Entry[]> {

// In-memory cache for GitHub-fetched entries
const entriesCache: Map<string, { entries: Entry[]; fetchedAt: number }> = 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(). */
Expand Down
2 changes: 1 addition & 1 deletion spec/JUDGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading