redis
class redis extends memory
ACM for Redis
Compatible with the php extension phpredis available at https://github.com/nicolasff/phpredis
Properties
$vars | from base | ||
$is_modified | from base | ||
$sql_rowset | from base | ||
$sql_row_pointer | from base | ||
$cache_dir | from base | ||
$key_prefix | from memory | ||
$extension | |||
$redis |
Methods
Purge cache data
Unload cache object
Fetch a field from the current row of a cached database result (database)
Seek a specific row in an a cached database result (database)
Free memory used for a cached database result (database)
Ensure query ID can be used by cache
Creates a redis cache driver.
Save result of an SQL query in cache.
Fetch an item from the cache
Store data in the cache
Remove an item from the cache
Details
at line 110
null
purge()
Purge cache data
at line 100
null
unload()
Unload cache object
in
base at line 96
int|bool
sql_load(string $query)
Load result of an SQL query from cache.
in
base at line 116
bool
sql_exists(int $query_id)
Check if result for a given SQL query exists in cache.
in
base at line 125
array|bool
sql_fetchrow(int $query_id)
Fetch row from cache (database)
in
base at line 139
string|bool
sql_fetchfield(int $query_id, string $field)
Fetch a field from the current row of a cached database result (database)
in
base at line 153
bool
sql_rowseek(int $rownum, int $query_id)
Seek a specific row in an a cached database result (database)
in
base at line 168
bool
sql_freeresult(int $query_id)
Free memory used for a cached database result (database)
in
base at line 189
bool
remove_file(string $filename, bool $check = false)
Removes/unlinks file
in
base at line 209
protected null
remove_dir(string $dir)
Remove directory
in
base at line 243
int|string
clean_query_id(object|resource|int|string $query_id)
Ensure query ID can be used by cache
at line 51
__construct()
Creates a redis cache driver.
The following global constants affect operation:
PHPBB_ACM_REDIS_HOST PHPBB_ACM_REDIS_PORT PHPBB_ACM_REDIS_PASSWORD PHPBB_ACM_REDIS_DB
There are no publicly documented constructor parameters.
in
memory at line 51
mixed
load()
Load global cache
in
memory at line 68
null
save()
Save modified objects
in
memory at line 83
null
tidy()
Tidy cache
in
memory at line 94
mixed
get(string $var_name)
Get saved cache object
in
memory at line 114
null
put(string $var_name, mixed $var, int $ttl = 2592000)
Put data into cache
in
memory at line 130
null
destroy(string $var_name, string $table = '')
Destroy cache data
in
memory at line 184
bool
_exists(string $var_name)
Check if a given cache entry exists
in
memory at line 204
int|mixed
sql_save(driver_interface $db, string $query, mixed $query_result, int $ttl)
Save result of an SQL query in cache.
In persistent cache stores, this function stores the query result to persistent storage. In other words, there is no need to call save() afterwards.
in
memory at line 277
protected bool
_isset(string $var)
Check if a cache var exists
at line 124
protected mixed
_read(string $var)
Fetch an item from the cache
at line 142
protected bool
_write(string $var, mixed $data, int $ttl = 2592000)
Store data in the cache
For the info, see https://phpredis.github.io/phpredis/Redis.html#method_set, https://redis.io/docs/latest/commands/set/ and https://redis.io/docs/latest/commands/expire/#appendix-redis-expires
at line 154
protected bool
_delete(string $var)
Remove an item from the cache