From 824942e2d1ec060a94d071bd82d1ace8614bde4f Mon Sep 17 00:00:00 2001 From: valeboth <109695782+valeboth@users.noreply.github.com> Date: Fri, 28 Aug 2026 12:08:32 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20raise=20deck=20cap=20MAX=5FDECK=20120?= =?UTF-8?q?=20=E2=86=92=20300?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Still well within the Cloudflare free tier: ~15 TMDb pages (cached), ~7 KV writes/room, a ~90KB deck-cards value — the tightest limit (KV writes, 1k/day) stays far off. --- src/lib/deck.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/deck.ts b/src/lib/deck.ts index cba2df2..d0339ff 100644 --- a/src/lib/deck.ts +++ b/src/lib/deck.ts @@ -15,7 +15,9 @@ const TOP_GENRES = 3; const MIN_DECK = 5; // Hard cap on the shared pool. The deck tops up on demand (extendDeck) but never // past this — keeps TMDb calls, KV writes and D1 row size bounded on the free tier. -const MAX_DECK = 120; +// ~300 → ~15 TMDb pages, ~7 KV writes/room, a ~90KB deck-cards value: all well +// within the free tier (tightest limit is KV writes, 1k/day). +const MAX_DECK = 300; // Pages pulled per top-up call (20 titles/page). Small → cheap, cache-friendly. const TOPUP_PAGES = 2; // Rotated across generation slices + top-up rounds so the pool isn't all "popular".