Skip to content

Node.js based forum software built for the modern web

fix: #11357 clear cache on thumb remove

Barış Soner Uşaklıa3a38e4ba3b1
diff --git a/src/topics/thumbs.js b/src/topics/thumbs.js
index f2bacf74d3..f6f6a88400 100644
--- a/src/topics/thumbs.js
+++ b/src/topics/thumbs.js
@@ -151,6 +151,9 @@ Thumbs.delete = async function (id, relativePaths) {
Promise.all(toRemove.map(async relativePath => posts.uploads.dissociate(mainPid, relativePath.slice(1)))),
]);
}
+ if (toRemove.length) {
+ cache.del(set);
+ }
};
Thumbs.deleteAll = async (id) => {