mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 20:29:40 +02:00
refactor: single cache.del call
This commit is contained in:
@@ -72,9 +72,7 @@ module.exports = function (Posts) {
|
|||||||
|
|
||||||
Posts.clearCachedPost = function (pid) {
|
Posts.clearCachedPost = function (pid) {
|
||||||
const cache = require('./cache');
|
const cache = require('./cache');
|
||||||
allowedTypes.forEach((type) => {
|
cache.del(allowedTypes.map(type => `${String(pid)}|${type}`));
|
||||||
cache.del(`${String(pid)}|${type}`);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Posts.parseSignature = async function (userData, uid) {
|
Posts.parseSignature = async function (userData, uid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user