Cache only non-empty result sets
This commit is contained in:
parent
f9c2c7ac9b
commit
4b6f28cd24
|
@ -483,7 +483,9 @@ class Solr implements LoggerAwareInterface
|
|||
$resultSet[] = $doc;
|
||||
}
|
||||
// Save value in cache.
|
||||
$cache->set($cacheIdentifier, $resultSet);
|
||||
if ($resultSet) {
|
||||
$cache->set($cacheIdentifier, $resultSet);
|
||||
}
|
||||
} else {
|
||||
// Return cache hit.
|
||||
$resultSet = $entry;
|
||||
|
|
Loading…
Reference in New Issue