mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
ttl for bandcamp albums.
This commit is contained in:
parent
9ec7b8c188
commit
ccee169078
1 changed files with 2 additions and 2 deletions
|
|
@ -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}` };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue