Openstatus www.openstatus.dev

chore: add public cache (#1115)

authored by

Maximilian Kaske and committed by
GitHub
33091d22 8dd350bc

+12 -2
+12 -2
packages/tinybird/src/client.ts
··· 3 3 import { flyRegions } from "../../db/src/schema/constants"; 4 4 import { headersSchema, timingSchema, triggers } from "./schema"; 5 5 6 + const PUBLIC_CACHE = 300; // 5 * 60 = 300s = 5m 7 + 6 8 export class OSTinybird { 7 9 private readonly tb: Client; 8 10 ··· 314 316 count: z.number().default(0), 315 317 ok: z.number().default(0), 316 318 }), 317 - opts: { cache: "no-store" }, 319 + opts: { 320 + next: { 321 + revalidate: PUBLIC_CACHE, 322 + }, 323 + }, 318 324 }); 319 325 } 320 326 ··· 655 661 count: z.number().default(0), 656 662 ok: z.number().default(0), 657 663 }), 658 - opts: { cache: "no-store" }, 664 + opts: { 665 + next: { 666 + revalidate: PUBLIC_CACHE, 667 + }, 668 + }, 659 669 }); 660 670 } 661 671