mako\cache\Adapter


Description


Cache adapter.


Class methods


Toggle source

public __construct($identifier)


Constructor.


Parameters

Type Description
string Cache identifier
Return value

NULL

public function __construct($identifier)
{
	$this->identifier = md5($identifier);
}

Toggle source

abstract public write($key, $value, $ttl = 0)

Return value

NULL

abstract public function write($key, $value, $ttl = 0);

Toggle source

abstract public read($key)

Return value

NULL

abstract public function read($key);

Toggle source

abstract public delete($key)

Return value

NULL

abstract public function delete($key);

Toggle source

abstract public clear()

Return value

NULL

abstract public function clear();

final public remember($key, $closure, $ttl = 0)


Fetches variable from cache and stores it if it doesn't exist.


Parameters

Type Description
string Cache key
closure Closure (anonymous function) that returns value to store if it doesn't already exist
int (optional) Time to live
Return value

mixed


final public __set($key, $value)


Magic setter.


Parameters

Type Description
string Cache key
mixed The variable to store
Return value

NULL


final public __get($key)


Magic getter.


Parameters

Type Description
string Cache key
Return value

mixed


final public __isset($key)


Magic isset.


Parameters

Type Description
string Cache key
Return value

boolean


final public __unset($key)


Magic unsetter.


Parameters

Type Description
string Cache key
Return value

NULL