From 45b25a1bd527e5614ce1096b6dc5a090a95e30a9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 3 Jan 2019 19:20:28 -0800 Subject: [PATCH] (dev/core#635) CRM_Contact_Selector - Move count to 'long' cache The selector was set to specifically store the size of the result set in the SQL-based cache. For epic:ro-db, we should be able to store these in a non-SQL location. The `long` cache suffices. --- CRM/Contact/Selector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index 989716ddb4..9418ff2282 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -536,11 +536,11 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se public function getTotalCount($action) { // Use count from cache during paging/sorting if (!empty($_GET['crmPID']) || !empty($_GET['crmSID'])) { - $count = CRM_Core_BAO_Cache::getItem('Search Results Count', $this->_key); + $count = Civi::cache('long')->get("Search Results Count $this->_key"); } if (empty($count)) { $count = $this->_query->searchQuery(0, 0, NULL, TRUE); - CRM_Core_BAO_Cache::setItem($count, 'Search Results Count', $this->_key); + Civi::cache('long')->set("Search Results Count $this->_key", $count); } return $count; } -- 2.25.1