public function clear($before = false) { return $this->app->db->remove("cockpit/history", $before ? ["time" => ['$lte' => $before]] : []); }