Class CDbCacheDependency
CDbCacheDependency represents a dependency based on the query result of a SQL statement.
If the query result (a scalar) changes, the dependency is considered as
changed. To specify the SQL statement, set CDbCacheDependency::$sql
property. The CDbCacheDependency::$connectionID
property specifies the ID of a CDbConnection
application
component. It is this DB connection that is used to perform the query.
- CComponent
- CCacheDependency implements ICacheDependency
- CDbCacheDependency
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/caching/dependencies/CDbCacheDependency.php
public
|
|
public
array
|
|
protected
mixed
|
#
generateDependentData( )
Generates the data needed to determine if dependency has been changed. This method returns the value of the global state. |
protected
|
evaluateDependency(),
getDependentData(),
getHasChanged(),
resetReusableData()
|
public
string
|
$connectionID | 'db' |
#
the ID of a |
public
string
|
$sql |
|
#
the SQL statement whose result is used to determine if the dependency has been changed. Note, the SQL statement should return back a single value. |
public
array
|
$params |
|
#
parameters (name=>value) to be bound to the SQL statement specified by
|
$reuseDependentData
|
$dependentData,
$hasChanged
|