Skip to content

Commit

Permalink
feat(product-controller): add cache control to response header
Browse files Browse the repository at this point in the history
  • Loading branch information
zylcom committed Jul 28, 2023
1 parent 525d912 commit 0a978fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/product-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const getBestRated = async (req, res, next) => {

const result = await productService.getBestRated(category);

res.status(200).json({ data: result });
res.status(200).set('Cache-Control', 'public, max-age=120000').json({ data: result });
} catch (error) {
next(error);
}
Expand Down

0 comments on commit 0a978fc

Please sign in to comment.