phpBB API Documentation
Class

cache

class cache extends acm

Class for grabbing/handling cached entries, extends acmfile or acmdb depending on the setup

Properties

$key_prefix
$vars
$is_modified
$sql_rowset
$sql_row_pointer
$cache_dir
$extension
$memcache
$flags

Methods

acm_memory()

Set cache path

from acm_memory
load()

Load global cache

from acm_memory
null unload()

Unload the cache resources

from acm
save()

Save modified objects

from acm_memory
tidy()

Tidy cache

from acm_memory
get($var_name)

Get saved cache object

from acm_memory
put($var_name, $var, $ttl = 2592000)

Put data into cache

from acm_memory
null purge()

Purge cache data

from acm
destroy($var_name, $table = '')

Destroy cache data

from acm_memory
_exists($var_name)

Check if a given cache entry exist

from acm_memory
sql_load($query)

Load cached sql query

from acm_memory
sql_save($query, $query_result, $ttl)

Save sql query

from acm_memory
sql_exists($query_id)

Ceck if a given sql query exist in cache

from acm_memory
sql_fetchrow($query_id)

Fetch row from cache (database)

from acm_memory
sql_fetchfield($query_id, $field)

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

from acm_memory
sql_rowseek($rownum, $query_id)

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

from acm_memory
sql_freeresult($query_id)

Free memory used for a cached database result (database)

from acm_memory
remove_file($filename, $check = false)

Removes/unlinks file

from acm_memory
bool _isset(string $var)

Check if a cache var exists

from acm_memory
acm()

from acm
mixed _read(string $var)

Fetch an item from the cache

from acm
bool _write(string $var, mixed $data, int $ttl = 2592000)

Store data in the cache

from acm
bool _delete(string $var)

Remove an item from the cache

from acm
obtain_config()

Get config values

obtain_word_list()

Obtain list of naughty words and build preg style replacement arrays for use by the calling script

obtain_icons()

Obtain currently listed icons

obtain_ranks()

Obtain ranks

array obtain_attach_extensions(mixed $forum_id)

Obtain allowed extensions

obtain_bots()

Obtain active bots

obtain_cfg_items($theme)

Obtain cfg file data

obtain_disallowed_usernames()

Obtain disallowed usernames

obtain_hooks()

Obtain hooks...

Details

in acm_memory at line 37
public acm_memory()

Set cache path

in acm_memory at line 62
public load()

Load global cache

in acm at line 76
public null unload()

Unload the cache resources

Return Value

null

in acm_memory at line 93
public save()

Save modified objects

in acm_memory at line 108
public tidy()

Tidy cache

in acm_memory at line 118
public get($var_name)

Get saved cache object

Parameters

$var_name

in acm_memory at line 138
public put($var_name, $var, $ttl = 2592000)

Put data into cache

Parameters

$var_name
$var
$ttl

in acm at line 88
public null purge()

Purge cache data

Return Value

null

in acm_memory at line 190
public destroy($var_name, $table = '')

Destroy cache data

Parameters

$var_name
$table

in acm_memory at line 244
public _exists($var_name)

Check if a given cache entry exist

Parameters

$var_name

in acm_memory at line 264
public sql_load($query)

Load cached sql query

Parameters

$query

in acm_memory at line 284
public sql_save($query, $query_result, $ttl)

Save sql query

Parameters

$query
$query_result
$ttl

in acm_memory at line 356
public sql_exists($query_id)

Ceck if a given sql query exist in cache

Parameters

$query_id

in acm_memory at line 364
public sql_fetchrow($query_id)

Fetch row from cache (database)

Parameters

$query_id

in acm_memory at line 377
public sql_fetchfield($query_id, $field)

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

Parameters

$query_id
$field

in acm_memory at line 390
public sql_rowseek($rownum, $query_id)

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

Parameters

$rownum
$query_id

in acm_memory at line 404
public sql_freeresult($query_id)

Free memory used for a cached database result (database)

Parameters

$query_id

in acm_memory at line 420
public remove_file($filename, $check = false)

Removes/unlinks file

Parameters

$filename
$check

in acm_memory at line 444
public bool _isset(string $var)

Check if a cache var exists

Parameters

string $var Cache key

Return Value

bool True if it exists, otherwise false

in acm at line 57
public acm()

in acm at line 102
public mixed _read(string $var)

Fetch an item from the cache

Parameters

string $var Cache key

Return Value

mixed Cached data

in acm at line 116
public bool _write(string $var, mixed $data, int $ttl = 2592000)

Store data in the cache

Parameters

string $var Cache key
mixed $data Data to store
int $ttl Time-to-live of cached data

Return Value

bool True if the operation succeeded

in acm at line 132
public bool _delete(string $var)

Remove an item from the cache

Parameters

string $var Cache key

Return Value

bool True if the operation succeeded

at line 28
public obtain_config()

Get config values

at line 74
public obtain_word_list()

Obtain list of naughty words and build preg style replacement arrays for use by the calling script

at line 101
public obtain_icons()

Obtain currently listed icons

at line 132
public obtain_ranks()

Obtain ranks

at line 177
public array obtain_attach_extensions(mixed $forum_id)

Obtain allowed extensions

Parameters

mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations.

Return Value

array allowed extensions array.

at line 282
public obtain_bots()

Obtain active bots

at line 332
public obtain_cfg_items($theme)

Obtain cfg file data

Parameters

$theme

at line 381
public obtain_disallowed_usernames()

Obtain disallowed usernames

at line 407
public obtain_hooks()

Obtain hooks...