Skip to content

Node.js based forum software built for the modern web

refactor: remove ttl on set, cache has it on init

Barış Soner Uşaklı86c9102ece49
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index a38f322d54..4963f00145 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -225,7 +225,7 @@ async function loadCrosspostPrivilege(req, excludeCid) {
if (cidsUserCanCrosspost === undefined) {
const cids = await categories.getAllCidsFromSet('categories:cid');
cidsUserCanCrosspost = await privileges.categories.filterCids('topics:crosspost', cids, req.uid);
- crosspostCache.set(`uid:${req.uid}`, cidsUserCanCrosspost, 3600000);
+ crosspostCache.set(`uid:${req.uid}`, cidsUserCanCrosspost);
}
return cidsUserCanCrosspost.filter(cid => cid !== excludeCid).length > 0;
}