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

Allow search specs caching to be disabled without fatal error.

parent e1071244
No related merge requests found
...@@ -75,8 +75,13 @@ class SearchSpecsReader ...@@ -75,8 +75,13 @@ class SearchSpecsReader
// Load data if it is not already in the object's cache: // Load data if it is not already in the object's cache:
if (!isset($this->searchSpecs[$filename])) { if (!isset($this->searchSpecs[$filename])) {
// Connect to searchspecs cache: // Connect to searchspecs cache:
$cache = (null !== $this->cacheManager) try {
? $this->cacheManager->getCache('searchspecs') : false; $cache = (null !== $this->cacheManager)
? $this->cacheManager->getCache('searchspecs') : false;
} catch (\Exception $e) {
// Don't blow up if we fail to retrieve the desired cache:
$cache = false;
}
// Determine full configuration file path: // Determine full configuration file path:
$fullpath = Locator::getBaseConfigPath($filename); $fullpath = Locator::getBaseConfigPath($filename);
......
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