class Cache

Cache controll using PEAR::Cache_Lite.

Constants

LIFETIME

Default cache lifetime.

CACHEDIR

Directory to save cache files.

Properties

static object $_instance Instance of PEAR::Cache_Lite class.

Methods

static void
forge()

Create Cache_Lite object and set it to static variable.

static void
getInstance()

Get Cache_Lite object.

static mixed
get(string $id, string $group = 'default', int $lifeTime = NULL)

Get data from cache.

static void
save(mixed $data, string $id, string $group = 'default')

Save data into cache.

static void
clean(string $group = FALSE)

Clean cache.

Details

at line 53
static void forge()

Create Cache_Lite object and set it to static variable.

Return Value

void

at line 68
static void getInstance()

Get Cache_Lite object.

Return Value

void

at line 83
static mixed get(string $id, string $group = 'default', int $lifeTime = NULL)

Get data from cache.

Parameters

string $id cache id
string $group name of the cache group
int $lifeTime custom lifetime

Return Value

mixed data of cache (else : false)

at line 106
static void save(mixed $data, string $id, string $group = 'default')

Save data into cache.

Parameters

mixed $data data of cache
string $id cache id
string $group name of the cache group

Return Value

void

at line 119
static void clean(string $group = FALSE)

Clean cache.

Parameters

string $group name of the cache group

Return Value

void