diff --git a/Classes/Domain/Repository/RecordRepository.php b/Classes/Domain/Repository/RecordRepository.php index f419736..8c163ca 100644 --- a/Classes/Domain/Repository/RecordRepository.php +++ b/Classes/Domain/Repository/RecordRepository.php @@ -107,7 +107,10 @@ public function findByPid(string $table, ?int $pid = null, bool $orderByTstamp = $result = $query->executeQuery() ->fetchAllAssociative(); - $this->cache->set($cacheIdentifier, $result, $this->collectCacheTags($table, $result)); + if (!empty($result)) { + $this->cache->set($cacheIdentifier, $result, $this->collectCacheTags($table, $result)); + } + return $result; }