From d75b022f5fe75e577e36ecb874ef021c6c06021e Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 29 Feb 2024 13:46:52 -0800 Subject: [PATCH] chore: cache policy --- api/now-playing.js | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/now-playing.js b/api/now-playing.js index 1c906277..b5201c94 100644 --- a/api/now-playing.js +++ b/api/now-playing.js @@ -58,7 +58,7 @@ export default async () => { const MUSIC_KEY = Netlify.env.get("API_KEY_LASTFM"); const headers = { "Content-Type": "application/json", - "Cache-Control": "public, s-maxage=3600, stale-while-revalidate=10800, stale-if-error=10800", + "Cache-Control": "public, s-maxage=3600, stale-while-revalidate=10800", }; const traktRes = await fetch("https://api.trakt.tv/users/cdransf/watching", { @@ -167,4 +167,7 @@ export default async () => { ); }; -export const config = { path: "/api/now-playing" }; +export const config = { + cache: "manual", + path: "/api/now-playing" +}; diff --git a/package.json b/package.json index 3159e0d6..21ba4fec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "6.9.2", + "version": "6.9.3", "description": "The source for my personal site. Built using 11ty and hosted on Netlify.", "type": "module", "scripts": {