caching\DbCache 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\DbCache 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. protected boolean addValue ( $key, $value, $duration )$key string The key identifying the value to be cached $value string The value to be cached. Other types (if you have disabled $serializer) cannot be saved. $duration integer The number of seconds in which the cached value will expire. 0 means never

caching\DbCache $gcProbability

$gcProbability public property The probability (parts per million) that garbage collection (GC) should be performed when storing a piece of data in the cache. Defaults to 100, meaning 0.01% chance. This number should be between 0 and 1000000. A value 0 meaning no GC will be performed at all. public integer $gcProbability = 100

caching\DbCache $db

$db public property The DB connection object or the application component ID of the DB connection. After the DbCache object is created, if you want to change this property, you should only assign it with a DB connection object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\db\Connection|array|string $db = 'db'

caching\DbCache $cacheTable

$cacheTable public property Name of the DB table to store cache content. The table should be pre-created as follows: CREATE TABLE cache ( id char(128) NOT NULL PRIMARY KEY, expire int(11), data BLOB ); where 'BLOB' refers to the BLOB-type of your preferred DBMS. Below are the BLOB type that can be used for some popular DBMS: MySQL: LONGBLOB PostgreSQL: BYTEA MSSQL: BLOB When using DbCache in a production server, we recommend you create a DB index for the 'expire' column in the

caching\ChainedDependency getHasChanged()

getHasChanged() public method Performs the actual dependency checking. This method returns true if any of the dependency objects reports a dependency change. public boolean getHasChanged ( $cache )$cache yii\caching\Cache The cache component that is currently evaluating this dependency return boolean Whether the dependency is changed or not.

caching\ChainedDependency generateDependencyData()

generateDependencyData() protected method Generates the data needed to determine if dependency has been changed. This method does nothing in this class. protected mixed generateDependencyData ( $cache )$cache yii\caching\Cache The cache component that is currently evaluating this dependency return mixed The data needed to determine if dependency has been changed.

caching\ChainedDependency evaluateDependency()

evaluateDependency() public method Evaluates the dependency by generating and saving the data related with dependency. public void evaluateDependency ( $cache )$cache yii\caching\Cache The cache component that is currently evaluating this dependency

caching\ChainedDependency $dependOnAll

$dependOnAll public property Whether this dependency is depending on every dependency in $dependencies. Defaults to true, meaning if any of the dependencies has changed, this dependency is considered changed. When it is set false, it means if one of the dependencies has NOT changed, this dependency is considered NOT changed. public boolean $dependOnAll = true

caching\ChainedDependency $dependencies

$dependencies public property List of dependencies that this dependency is composed of. Each array element must be a dependency object. public yii\caching\Dependency[] $dependencies = []