mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
refactor: single cache.del call
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user