command to wipe thumb cache

This commit is contained in:
Shish 2020-02-09 00:32:53 +00:00
parent 9514075594
commit 6087d31812

View File

@ -64,6 +64,13 @@ class Rule34 extends Extension
public function onCommand(CommandEvent $event)
{
global $cache;
if ($event->cmd == "wipe-thumb-cache") {
foreach (Image::find_images_iterable(0, null, Tag::explode($event->args[0])) as $image) {
print($image->id . "\n");
$cache->delete("thumb-block:{$image->id}");
}
}
}
public function onSourceSet(SourceSetEvent $event)