Skip to content

Node.js based forum software built for the modern web

fix: clear category cache on copy parent

Barış Soner Uşaklı765db86d4ef8
diff --git a/src/categories/create.js b/src/categories/create.js
index 81c3c22f0b..d5246dd497 100644
--- a/src/categories/create.js
+++ b/src/categories/create.js
@@ -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;