diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php index 1fe4a1277ddea3631534041e9a7edbbe275a688e..2aee535968196f9dea0e58d04d9aa79a45a09386 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php @@ -80,6 +80,13 @@ class Solr extends AbstractBase */ protected $batchSize = 1000; + /** + * Hierarchy cache file prefix. + * + * @var string + */ + protected $cachePrefix = null; + /** * Constructor. * @@ -265,7 +272,9 @@ class Solr extends AbstractBase $cacheTemplate = 'tree_%s' ) { $cacheFile = (null !== $this->cacheDir) - ? $this->cacheDir . '/' . sprintf($cacheTemplate, urlencode($id)) + ? $this->cacheDir . '/' + . ($this->cachePrefix ? "{$this->cachePrefix}_" : '') + . sprintf($cacheTemplate, urlencode($id)) : false; $useCache = isset($options['refresh']) ? !$options['refresh'] : true;