From a8aedee5875bf7789e8794bd90410be35bef9cf0 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 6 Aug 2024 00:49:41 -0700 Subject: [PATCH] Lower cache time to 1 hour --- src/routes/api/giantbomb/+server.ts | 2 +- src/routes/api/psn/+server.ts | 2 +- src/routes/api/steam/+server.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/api/giantbomb/+server.ts b/src/routes/api/giantbomb/+server.ts index dc1b0d5..b947fd8 100644 --- a/src/routes/api/giantbomb/+server.ts +++ b/src/routes/api/giantbomb/+server.ts @@ -5,7 +5,7 @@ import GiantBombAPI from 'giantbombing-api' import type { RequestHandler } from './$types' -const CACHE_TTL = 60 * 60 * 24 * 7 +const CACHE_TTL = 60 * 60 // 1 hour const giantBombAPI = new GiantBombAPI({ apiKey: process.env.GIANTBOMB_API_KEY, diff --git a/src/routes/api/psn/+server.ts b/src/routes/api/psn/+server.ts index 7f7d3ab..060c1b0 100644 --- a/src/routes/api/psn/+server.ts +++ b/src/routes/api/psn/+server.ts @@ -17,7 +17,7 @@ const { getUserPlayedTime } = require('psn-api') -const CACHE_TTL = 60 * 60 * 24 +const CACHE_TTL = 60 * 60 // 1 hour const PSN_NPSSO_TOKEN = process.env.PSN_NPSSO_TOKEN const PSN_ID = '1275018559140296533' diff --git a/src/routes/api/steam/+server.ts b/src/routes/api/steam/+server.ts index d4abe5e..8d731f6 100644 --- a/src/routes/api/steam/+server.ts +++ b/src/routes/api/steam/+server.ts @@ -5,7 +5,7 @@ import SteamAPI, { Game, GameInfo, GameInfoExtended, UserPlaytime } from 'steama import type { RequestHandler } from './$types' -const CACHE_TTL = 60 * 60 * 24 // 24 hours in seconds +const CACHE_TTL = 60 * 60 // 1 hour const STEAM_ID = '76561197997279808' export const GET: RequestHandler = async ({ params }) => {