From 643412f2f3f020cb0dccef130d84a2d201ecc5bd Mon Sep 17 00:00:00 2001 From: Pablo Stanley Date: Sun, 19 Apr 2026 18:36:19 -0700 Subject: [PATCH] Frames endpoint: use DETERMINISTIC_CACHE (stale-while-revalidate) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #165 added the frames metadata endpoint with a hand-rolled `immutable` Cache-Control header — the exact policy PR #166 just moved every other deterministic endpoint away from. Make it consistent so animVersion bumps propagate within ~1 day without a manual purge. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/src/app/api/pixabot/[id]/frames/route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/app/api/pixabot/[id]/frames/route.ts b/app/src/app/api/pixabot/[id]/frames/route.ts index 8533f54..97234c8 100644 --- a/app/src/app/api/pixabot/[id]/frames/route.ts +++ b/app/src/app/api/pixabot/[id]/frames/route.ts @@ -13,7 +13,7 @@ import { resolveFrameIndex, type PartCategory, } from "@pixabots/core"; -import { CORS_HEADERS, optionsResponse } from "@/lib/api"; +import { CORS_HEADERS, optionsResponse, DETERMINISTIC_CACHE } from "@/lib/api"; export const OPTIONS = optionsResponse; @@ -75,8 +75,8 @@ export async function GET( { headers: { ...CORS_HEADERS, - "Cache-Control": "public, max-age=31536000, immutable", - "CDN-Cache-Control": "public, max-age=31536000, immutable", + "Cache-Control": DETERMINISTIC_CACHE, + "CDN-Cache-Control": DETERMINISTIC_CACHE, }, } );