Skip to content

Commit

Permalink
Disable cache for points for now
Browse files Browse the repository at this point in the history
  • Loading branch information
rbjarnason committed Feb 12, 2022
1 parent 97862ca commit 690a556
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server_api/controllers/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ const sendPostPoints = (req, res, redisKey) => {

router.get('/:id/points', auth.can('view post'), function(req, res) {
const redisKey = "cache:post_points:"+req.params.id+(req.query.offsetUp ? ":offsetup:"+req.query.offsetUp : "")+":"+(req.query.offsetDown ? ":offsetdown:"+req.query.offsetDown : "");
if (process.env.DISABLE_POST_POINTS_CACHE) {
// Disable cache for now until we figure out to invalidate the cache on delete points
if (true || process.env.DISABLE_POST_POINTS_CACHE) {
sendPostPoints(req, res);
} else {
req.redisClient.get(redisKey, (error, points) => {
Expand Down

0 comments on commit 690a556

Please sign in to comment.