From ccee1690787974429f9ac90d318cce36cc1992c2 Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Fri, 13 Dec 2024 13:39:13 -0800 Subject: [PATCH] ttl for bandcamp albums. --- src/lib/util/fetchBandcampAlbums.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/util/fetchBandcampAlbums.ts b/src/lib/util/fetchBandcampAlbums.ts index dbeca6b..817cc62 100644 --- a/src/lib/util/fetchBandcampAlbums.ts +++ b/src/lib/util/fetchBandcampAlbums.ts @@ -11,10 +11,10 @@ export async function fetchBandcampAlbums() { if (cached) { const response: Album[] = JSON.parse(cached); - console.log(`Cache hit!`); + console.log('Albums cache hit!'); const ttl = await redis.ttl('bandcampAlbums'); - return response; + return { ...response, cacheControl: `max-age=${ttl}` }; } }