diff --git a/api/validPetPoses.js b/api/validPetPoses.js index 027caea..dba5f1c 100644 --- a/api/validPetPoses.js +++ b/api/validPetPoses.js @@ -2,5 +2,10 @@ import getValidPetPoses from "../src/server/getValidPetPoses"; export default async (req, res) => { const buffer = await getValidPetPoses(); + + // Cache for 1 hour. This will also cache at Vercel's CDN, so the function + // shouldn't even get run very often at all! + res.setHeader("Cache-Control", "max-age=3600"); + res.status(200).send(buffer); };