Skip to content

Commit

Permalink
Merge pull request #2 from derin-art/cache
Browse files Browse the repository at this point in the history
adding caching
  • Loading branch information
derin-art authored Dec 30, 2022
2 parents fd39991 + 2c370dd commit 16761ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pages/api/getStoreItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ handler.get(async (req, res) => {
const data = await ShopItem.find({
itemCollection: req.query.collection,
});
res.setHeader("Cache-control", "public, max-age=200");
return res.status(200).send(data);
} catch (err) {}
});
Expand Down

1 comment on commit 16761ca

@vercel
Copy link

@vercel vercel bot commented on 16761ca Dec 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vert-crud-8d3s – ./

vert-crud-8d3s.vercel.app
vert-crud-8d3s-derin-art.vercel.app
vert-crud-8d3s-git-main-derin-art.vercel.app

Please sign in to comment.