feat: actually cache duh

This commit is contained in:
Barış Soner Uşaklı
2019-09-13 22:13:27 -04:00
parent 63bd252fba
commit f05c1dae69

View File

@@ -239,7 +239,9 @@ module.exports = function (Topics) {
if (cached !== undefined) { if (cached !== undefined) {
return cached; 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) { async function findMatches(query, cid) {