From c12966c893428e0821ecc315e5bc7a62355eb9ad Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Fri, 17 Feb 2023 16:23:28 -0800 Subject: [PATCH] Caching bandcamp albums call. --- src/lib/components/articles/index.svelte | 1 + src/lib/util/fetchBandcampAlbums.ts | 18 +++++++++++++++++- src/routes/+page.svelte | 2 -- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/lib/components/articles/index.svelte b/src/lib/components/articles/index.svelte index ff50f1f..b811c98 100644 --- a/src/lib/components/articles/index.svelte +++ b/src/lib/components/articles/index.svelte @@ -16,6 +16,7 @@

0) { + if (USE_REDIS_CACHE) { + redis.set('bandcampAlbums', JSON.stringify(albums), 'EX', 43200); + } return albums; } else { return []; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b6c292d..b07fce3 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -29,7 +29,6 @@

Hello! I'm Bradley Shellnut.

-

I'm a full stack software engineer currently working on Java Spring, PostgreSQL, and React / Angular JS.

@@ -69,7 +68,6 @@
, or read more about me.

-