caching\MemCacheServer $port

$port public property Memcache server port public integer $port = 11211

caching\MemCacheServer $persistent

$persistent public property Whether to use a persistent connection. This is used by memcache only. public boolean $persistent = true

caching\MemCacheServer $host

$host public property Memcache server hostname or IP address public string $host = null

caching\MemCacheServer $failureCallback

$failureCallback public property This callback function will run upon encountering an error. The callback is run before fail over is attempted. The function takes two parameters, the $host and the $port of the failed server. This is used by memcache only. public Closure $failureCallback = null

caching\MemCache setValues()

setValues() protected method Stores multiple key-value pairs in cache. protected array setValues ( $data, $duration )$data array Array where key corresponds to cache key while value is the value stored $duration integer The number of seconds in which the cached values will expire. 0 means never expire. return array Array of failed keys. Always empty in case of using memcached.

caching\MemCache setValue()

setValue() protected method Stores a value identified by a key in cache. This is the implementation of the method declared in the parent class. See also \MemcachePool::set(). protected boolean setValue ( $key, $value, $duration )$key string The key identifying the value to be cached $value mixed The value to be cached. $duration integer The number of seconds in which the cached value will expire. 0 means never expire. return boolean True if the value is successfully stored into cac

caching\MemCache setServers()

setServers() public method See also: http://php.net/manual/en/memcache.addserver.php http://php.net/manual/en/memcached.addserver.php public void setServers ( $config )$config array List of memcache or memcached server configurations. Each element must be an array with the following keys: host, port, persistent, weight, timeout, retryInterval, status.

caching\MemCache init()

init() public method Initializes this application component. It creates the memcache instance and adds memcache servers. public void init ( )

caching\MemCache getValues()

getValues() protected method Retrieves multiple values from cache with the specified keys. protected array getValues ( $keys )$keys array A list of keys identifying the cached values return array A list of cached values indexed by the keys

caching\MemCache getValue()

getValue() protected method Retrieves a value from cache with a specified key. This is the implementation of the method declared in the parent class. protected mixed|false getValue ( $key )$key string A unique key identifying the cached value return mixed|false The value stored in cache, false if the value is not in the cache or expired.