phpBB API Documentation
Class

phpbb\cache\driver\base

abstract class base implements driver_interface

Properties

$vars
$is_modified
$sql_rowset
$sql_row_pointer
$cache_dir

Methods

null purge()

Purge cache data

null unload()

Unload cache object

int|bool sql_load(string $query)

Load result of an SQL query from 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)

bool remove_file(string $filename, bool $check = false)

Removes/unlinks file

Details

at line 28
public null purge()

Purge cache data

Return Value

null

at line 81
public null unload()

Unload cache object

Return Value

null

at line 96
public int|bool sql_load(string $query)

Load result of an SQL query from cache.

Parameters

string $query SQL query

Return Value

int|bool Query ID (integer) if cache contains a rowset for the specified query. False otherwise.

at line 116
public bool sql_exists(int $query_id)

Check if result for a given SQL query exists in cache.

Parameters

int $query_id

Return Value

bool

at line 124
public array|bool sql_fetchrow(int $query_id)

Fetch row from cache (database)

Parameters

int $query_id

Return Value

array|bool The query result if found in the cache, otherwise false.

at line 137
public string|bool sql_fetchfield(int $query_id, string $field)

Fetch a field from the current row of a cached database result (database)

Parameters

int $query_id
string $field The name of the column.

Return Value

string|bool The field of the query result if found in the cache, otherwise false.

at line 150
public bool sql_rowseek(int $rownum, int $query_id)

Seek a specific row in an a cached database result (database)

Parameters

int $rownum Row to seek to.
int $query_id

Return Value

bool

at line 164
public bool sql_freeresult(int $query_id)

Free memory used for a cached database result (database)

Parameters

int $query_id

Return Value

bool

at line 184
public bool remove_file(string $filename, bool $check = false)

Removes/unlinks file

Parameters

string $filename Filename to remove
bool $check Check file permissions

Return Value

bool True if the file was successfully removed, otherwise false