caching\MemCache getServers()

getServers() public method Returns the memcache or memcached server configurations. public yii\caching\MemCacheServer[] getServers ( )return yii\caching\MemCacheServer[] List of memcache server configurations.

caching\MemCache getMemcache()

getMemcache() public method Returns the underlying memcache (or memcached) object. public \Memcache|\Memcached getMemcache ( )return \Memcache|\Memcached The memcache (or memcached) object used by this cache component. throws yii\base\InvalidConfigException if memcache or memcached extension is not loaded

caching\MemCache flushValues()

flushValues() protected method Deletes all values from cache. This is the implementation of the method declared in the parent class. protected boolean flushValues ( )return boolean Whether the flush operation was successful.

caching\MemCache deleteValue()

deleteValue() protected method Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class. protected boolean deleteValue ( $key )$key string The key of the value to be deleted return boolean If no error happens during deletion

caching\MemCache addValue()

addValue() protected method Stores a value identified by a key into cache if the cache does not contain this key. This is the implementation of the method declared in the parent class. See also \MemcachePool::set(). protected boolean addValue ( $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 t

caching\MemCache addServers()

addServers() protected method Add servers to the server pool of the cache specified protected void addServers ( $cache, $servers )$cache \Memcache|\Memcached $servers yii\caching\MemCacheServer[] throws yii\base\InvalidConfigException

caching\MemCache addMemcacheServers()

addMemcacheServers() protected method Add servers to the server pool of the cache specified Used for memcache PECL extension. protected void addMemcacheServers ( $cache, $servers )$cache \Memcache $servers yii\caching\MemCacheServer[]

caching\MemCache addMemcachedServers()

addMemcachedServers() protected method Add servers to the server pool of the cache specified Used for memcached PECL extension. protected void addMemcachedServers ( $cache, $servers )$cache \Memcached $servers yii\caching\MemCacheServer[]

caching\MemCache $username

$username public property Memcached sasl username. This property is used only when $useMemcached is true. See also http://php.net/manual/en/memcached.setsaslauthdata.php. public string $username = null

caching\MemCache $useMemcached

$useMemcached public property Whether to use memcached or memcache as the underlying caching extension. If true, memcached will be used. If false, memcache will be used. Defaults to false. public boolean $useMemcached = false