diff --git a/src/posts/parse.js b/src/posts/parse.js index 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) {