From c434d745e267f32c1fd3b72cf6e44c8729edafa1 Mon Sep 17 00:00:00 2001 From: Shivam Meena Date: Mon, 31 Oct 2022 01:02:38 +0530 Subject: [PATCH] Cache All the time --- src/lib/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/index.ts b/src/lib/index.ts index 8fe68c3..06ec8f8 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -3,7 +3,6 @@ import satori from 'satori'; import { Resvg, initWasm } from '@resvg/resvg-wasm'; import type { SatoriOptions } from 'satori'; import type { SvelteComponent } from 'svelte'; -import { dev } from '$app/environment'; const resSvgWasm = initWasm(fetch('https://sveltekit-og.ethercorps.io/resvg.wasm')); const fontFile = await fetch('https://sveltekit-og.ethercorps.io/noto-sans.ttf'); @@ -36,9 +35,7 @@ class ImageResponse { return new Response(png, { headers: { 'Content-Type': 'image/png', - 'cache-control': dev - ? 'no-cache, no-store' - : 'public, immutable, no-transform, max-age=31536000', + 'cache-control': 'public, immutable, no-transform, max-age=31536000', ...options.headers },