command to wipe thumb cache
This commit is contained in:
parent
9514075594
commit
6087d31812
@ -64,6 +64,13 @@ class Rule34 extends Extension
|
|||||||
|
|
||||||
public function onCommand(CommandEvent $event)
|
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)
|
public function onSourceSet(SourceSetEvent $event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user