Node.js based forum software built for the modern web
refactor: single cache.del call
Barış Soner Uşaklı9868a728bff2
diff --git a/src/posts/parse.js b/src/posts/parse.jsindex 2b7d5081d4..e51128b6e4 100644--- a/src/posts/parse.js+++ b/src/posts/parse.js@@ -72,9 +72,7 @@ module.exports = function (Posts) {Posts.clearCachedPost = function (pid) {const cache = require('./cache');- allowedTypes.forEach((type) => {- cache.del(`${String(pid)}|${type}`);- });+ cache.del(allowedTypes.map(type => `${String(pid)}|${type}`));};Posts.parseSignature = async function (userData, uid) {