chore: cache policy

This commit is contained in:
Cory Dransfeldt 2024-02-29 13:46:52 -08:00
parent ae7057518c
commit d75b022f5f
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -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"
};

View file

@ -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": {