fix: #11357 clear cache on thumb remove

This commit is contained in:
Barış Soner Uşaklı
2023-03-14 14:30:46 -04:00
parent cfd5027245
commit a3a38e4ba3

View File

@@ -151,6 +151,9 @@ Thumbs.delete = async function (id, relativePaths) {
Promise.all(toRemove.map(async relativePath => posts.uploads.dissociate(mainPid, relativePath.slice(1)))), Promise.all(toRemove.map(async relativePath => posts.uploads.dissociate(mainPid, relativePath.slice(1)))),
]); ]);
} }
if (toRemove.length) {
cache.del(set);
}
}; };
Thumbs.deleteAll = async (id) => { Thumbs.deleteAll = async (id) => {