mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: clear category cache on copy parent
This commit is contained in:
@@ -141,7 +141,12 @@ module.exports = function (Categories) {
|
||||
if (copyParent && newParent !== parseInt(toCid, 10)) {
|
||||
await db.sortedSetRemove(`cid:${oldParent}:children`, toCid);
|
||||
await db.sortedSetAdd(`cid:${newParent}:children`, source.order, toCid);
|
||||
cache.del([`cid:${oldParent}:children`, `cid:${newParent}:children`]);
|
||||
cache.del([
|
||||
`cid:${oldParent}:children`,
|
||||
`cid:${oldParent}:children:all`,
|
||||
`cid:${newParent}:children`,
|
||||
`cid:${newParent}:children:all`,
|
||||
]);
|
||||
}
|
||||
|
||||
destination.description = source.description;
|
||||
|
||||
Reference in New Issue
Block a user