diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php index 184a3d326f9da03d832a48fe1d1111c36862ba78..51b6d2d005fa16f4bdaf3a8fefa0fbe67cfceb37 100644 --- a/app/Models/Searchengine.php +++ b/app/Models/Searchengine.php @@ -236,6 +236,7 @@ abstract class Searchengine $body = Cache::get($this->hash); } elseif (Redis::hexists('search.' . $this->resultHash, $this->name)) { $body = Redis::hget('search.' . $this->resultHash, $this->name); + Redis::hdel('search.' . $this->resultHash, $this->name); if ($this->canCache && $this->cacheDuration > 0) { Cache::put($this->hash, $body, $this->cacheDuration); } @@ -244,7 +245,6 @@ abstract class Searchengine $this->loadResults($body); $this->getNext($metager, $body); $this->loaded = true; - Redis::hdel('search.' . $this->hash, $this->name); return true; } else { return false;