Skip to content
Snippets Groups Projects
Commit b06161c6 authored by Demian Katz's avatar Demian Katz
Browse files

Merge pull request #163 from KDK-Alli/searchspecsreader

Fixed a comparison operator to fix searchspecs caching.
parents 1dc16387 22d40f64
No related merge requests found
...@@ -90,7 +90,7 @@ class SearchSpecsReader ...@@ -90,7 +90,7 @@ class SearchSpecsReader
$cacheKey = md5($cacheKey); $cacheKey = md5($cacheKey);
// Generate data if not found in cache: // Generate data if not found in cache:
if (!$cache || !($results = $cache->getItem($cacheKey))) { if ($cache === false || !($results = $cache->getItem($cacheKey))) {
$results = Yaml::parse($fullpath); $results = Yaml::parse($fullpath);
if (!empty($local)) { if (!empty($local)) {
$localResults = Yaml::parse($local); $localResults = Yaml::parse($local);
...@@ -98,7 +98,7 @@ class SearchSpecsReader ...@@ -98,7 +98,7 @@ class SearchSpecsReader
$results[$key] = $value; $results[$key] = $value;
} }
} }
if ($cache) { if ($cache !== false) {
$cache->setItem($cacheKey, $results); $cache->setItem($cacheKey, $results);
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment