diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 8af30e8030..96a1628efc 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -246,14 +246,13 @@ class JournalCollector implements JournalCollectorInterface $this->run = true; // find query set in cache. - $hash = hash('sha256', $this->query->toSql()); + $hash = hash('sha256', $this->query->toSql() . serialize($this->query->getBindings())); $key = 'query-' . substr($hash, -8); $cache = new CacheProperties; $cache->addProperty($key); if ($cache->has()) { Log::debug(sprintf('Return cache of query with ID "%s".', $key)); - - return $cache->get(); // @codeCoverageIgnore + //return $cache->get(); // @codeCoverageIgnore } /** @var Collection $set */ @@ -299,14 +298,6 @@ class JournalCollector implements JournalCollectorInterface return $journals; } - /** - * @return EloquentBuilder - */ - public function getQuery(): EloquentBuilder - { - return $this->query; - } - /** * @param string $filter * diff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.php index b5d8e4100c..30243ac6db 100644 --- a/app/Helpers/Collector/JournalCollectorInterface.php +++ b/app/Helpers/Collector/JournalCollectorInterface.php @@ -79,8 +79,6 @@ interface JournalCollectorInterface */ public function getPaginatedJournals(): LengthAwarePaginator; - public function getQuery(): EloquentBuilder; - /** * @param string $filter *