From bb0e3876b6f783f0afdc9f6921e32c68d0404d89 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 21 Sep 2020 16:16:01 -0400
Subject: [PATCH] Account for facet boolean operators when generating cache
 key. - Resolves VUFIND-1433

---
 module/VuFind/src/VuFind/Search/Base/FacetCache.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Search/Base/FacetCache.php b/module/VuFind/src/VuFind/Search/Base/FacetCache.php
index 740bb2f7734..f5083ebf89b 100644
--- a/module/VuFind/src/VuFind/Search/Base/FacetCache.php
+++ b/module/VuFind/src/VuFind/Search/Base/FacetCache.php
@@ -90,7 +90,13 @@ abstract class FacetCache
     protected function getCacheKey()
     {
         $params = $this->results->getParams();
-        $settings = [$params->getFacetConfig(), $params->getHiddenFilters()];
+        $facetConfig = $params->getFacetConfig();
+        $settings = [
+            $facetConfig,
+            $params->getHiddenFilters(),
+            // Factor operator settings into cache key:
+            array_map([$params, 'getFacetOperator'], array_keys($facetConfig)),
+        ];
         return $this->language . md5(print_r($settings, true));
     }
 
-- 
GitLab