Commit 45b25a1b authored by totten's avatar totten

(#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.
parent a7e974f9
......@@ -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;
Markdown is supported
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