CRM_Core_PrevNextCache_Redis
class CRM_Core_PrevNextCache_Redis implements CRM_Core_PrevNextCache_Interface
Class CRM_Core_PrevNextCache_Memory
Store the previous/next cache in a Redis set.
Each logical prev-next cache corresponds to three distinct items in Redis:
- "{prefix}/{qfKey}/list" - Sorted set of entity_id
, with all entities
- "{prefix}/{qfkey}/sel" - Sorted set of entity_id
, with only entities marked by user
- "{prefix}/{qfkey}/data" - Hash mapping from entity_id
to data
Constants
TTL |
|
Properties
protected Redis | $redis | ||
protected string | $prefix |
Methods
CRM_Core_PrevNextCache_Redis constructor.
Store the results of a SQL query in the cache.
Store the contents of an array in the cache.
Fetch a list of contacts from the prev/next cache for displaying a search results page
Save checkbox selections.
Get the selections.
Get the previous and next keys.
Delete an item from the prevnext cache table based on the entity.
Get count of matching rows.
No description
Details
at line 58
__construct(array $settings)
CRM_Core_PrevNextCache_Redis constructor.
at line 64
bool
fillWithSql(string $cacheKey, string $sql, array $sqlParams = [])
Store the results of a SQL query in the cache.
at line 82
bool
fillWithArray(string $cacheKey, array $rows)
Store the contents of an array in the cache.
at line 94
array
fetch(string $cacheKey, int $offset, int $rowCount)
Fetch a list of contacts from the prev/next cache for displaying a search results page
at line 99
markSelection(string $cacheKey, string $action, array|int|null $ids = NULL)
Save checkbox selections.
at line 120
array|NULL
getSelection(string $cacheKey, string $action = 'get')
Get the selections.
at line 143
array
getPositions(string $cacheKey, int $id1)
Get the previous and next keys.
at line 174
deleteItem(int $id = NULL, string $cacheKey = NULL)
Delete an item from the prevnext cache table based on the entity.
at line 208
int
getCount(string $cacheKey)
Get count of matching rows.