From faf0b4c6eea29568d84a1be97f7a606d9a309ff6 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 18 Feb 2024 20:17:33 -0800 Subject: [PATCH] fix: cache links to b2 --- src/_data/links.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_data/links.js b/src/_data/links.js index fd82af1a..817ffc53 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -39,6 +39,7 @@ export default async function () { const maxRequests = process.env.ELEVENTY_PRODUCTION ? 10 : 2 let nextPageCursor = null; let requestCount = 0; + let cachedLinks; if (process.env.ELEVENTY_PRODUCTION) { const cachedLinksOutput = await client.send( @@ -48,7 +49,7 @@ export default async function () { }) ) const cachedLinksData = getReadableData(cachedLinksOutput.Body) - const cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch() + cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch() } while (true) {