Skip to content

Commit

Permalink
Add comment re: definitions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
xjensen committed Oct 27, 2023
1 parent 9d6c053 commit bc61dfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/http/get-benefits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let definitions = {};
exports.handler = arc.http.async(async (req) => {
// If definitions is empty, fetch it from S3.
if (Object.keys(definitions).length === 0) {
console.log("Definitions cache is cold. Fetching definitions from S3.");
definitions = await getDefinitions();
}

Expand All @@ -32,7 +33,7 @@ exports.handler = arc.http.async(async (req) => {
statusCode: 204,
};
}

const data = {
header: "Apply for more benefits!",
tagline: "You might be able to get:",
Expand Down

0 comments on commit bc61dfa

Please sign in to comment.