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.
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;
}