Skip to content

Node.js based forum software built for the modern web

feat: actually cache duh

Barış Soner Uşaklıf05c1dae69dd
diff --git a/src/topics/tags.js b/src/topics/tags.js
index b68d409ea4..22fb2abae4 100644
--- a/src/topics/tags.js
+++ b/src/topics/tags.js
@@ -239,7 +239,9 @@ module.exports = function (Topics) {
if (cached !== undefined) {
return cached;
}
- return await db.getSortedSetRevRange('tags:topic:count', 0, -1);
+ const tags = await db.getSortedSetRevRange('tags:topic:count', 0, -1);
+ cache.set('tags:topic:count', tags);
+ return tags;
}
async function findMatches(query, cid) {