@@ -24,7 +24,7 @@ class Delete extends Method
WHERE id IN (?ai:ids)';
$this->c->DB->exec($query, $vars);
- $this->model->load();
+ $this->model->reset();
}
return $this->model;
@@ -76,4 +76,16 @@ class Model extends ParentModel
return (isset($bin[4]) ? '' : '-') . \bin2hex($bin);
+
+ /**
+ * Сбрасывает кеш банов
+ */
+ public function reset(): Model
+ {
+ if (true !== $this->c->Cache->delete('banlist')) {
+ throw new RuntimeException('Unable to remove key from cache - banlist');
+ }
+ return $this;
@@ -677,7 +677,7 @@ class Bans extends Admin
]);
- $this->c->bans->load();
+ $this->c->bans->reset();
$redirect = $this->c->Redirect;