mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +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)) {
|
if (copyParent && newParent !== parseInt(toCid, 10)) {
|
||||||
await db.sortedSetRemove(`cid:${oldParent}:children`, toCid);
|
await db.sortedSetRemove(`cid:${oldParent}:children`, toCid);
|
||||||
await db.sortedSetAdd(`cid:${newParent}:children`, source.order, 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;
|
destination.description = source.description;
|
||||||
|
|||||||
Reference in New Issue
Block a user