interface driver_interface
An interface that all cache drivers must implement
Methods
mixed |
load()
Load global cache |
|
null |
unload()
Unload cache object |
|
null |
save()
Save modified objects |
|
null |
tidy()
Tidy cache |
|
mixed |
get(string $var_name)
Get saved cache object |
|
null |
put(string $var_name, mixed $var, int $ttl)
Put data into cache |
|
null |
purge()
Purge cache data |
|
null |
destroy(string $var_name, string $table = '')
Destroy cache data |
|
bool |
_exists(string $var_name)
Check if a given cache entry exists |
|
int|bool |
sql_load(string $query)
Load result of an SQL query from cache. |
|
int|mixed |
sql_save(driver_interface $db, string $query, mixed $query_result, int $ttl)
Save result of an SQL query in cache. |
|
bool |
sql_exists(int $query_id)
Check if result for a given SQL query exists in cache. |
|
array|bool |
sql_fetchrow(int $query_id)
Fetch row from cache (database) |
|
string|bool |
sql_fetchfield(int $query_id, string $field)
Fetch a field from the current row of a cached database result (database) |
|
bool |
sql_rowseek(int $rownum, int $query_id)
Seek a specific row in an a cached database result (database) |
|
bool |
sql_freeresult(int $query_id)
Free memory used for a cached database result (database) |
Details
at line 26
public mixed
load()
Load global cache
at line 33
public null
unload()
Unload cache object
at line 40
public null
save()
Save modified objects
at line 47
public null
tidy()
Tidy cache
at line 55
public mixed
get(string $var_name)
Get saved cache object
at line 65
public null
put(string $var_name, mixed $var, int $ttl)
Put data into cache
at line 72
public null
purge()
Purge cache data
at line 81
public null
destroy(string $var_name, string $table = '')
Destroy cache data
at line 91
public bool
_exists(string $var_name)
Check if a given cache entry exists
at line 102
public int|bool
sql_load(string $query)
Load result of an SQL query from cache.
at line 122
public 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.
at line 130
public bool
sql_exists(int $query_id)
Check if result for a given SQL query exists in cache.
at line 139
public array|bool
sql_fetchrow(int $query_id)
Fetch row from cache (database)
at line 149
public string|bool
sql_fetchfield(int $query_id, string $field)
Fetch a field from the current row of a cached database result (database)
at line 158
public bool
sql_rowseek(int $rownum, int $query_id)
Seek a specific row in an a cached database result (database)
at line 166
public bool
sql_freeresult(int $query_id)
Free memory used for a cached database result (database)