PHP Class yii\caching\DbDependency
If the query result changes, the dependency is considered as changed.
The query is specified via the [[sql]] property.
For more details and usage information on Cache, see the
guide article on caching.
Datei anzeigen
Open project: yiisoft/yii2
Class Usage Examples
Public Properties
Property |
Type |
Description |
|
$db |
|
the application component ID of the DB connection. |
|
$params |
|
the parameters (name => value) to be bound to the SQL statement specified by [[sql]]. |
|
$sql |
|
the SQL query whose result is used to determine if the dependency has been changed.
Only the first row of the query result will be used. |
|
Protected Methods
Method |
Description |
|
generateDependencyData ( Cache $cache ) : mixed |
Generates the data needed to determine if dependency has been changed. |
|
Method Details
generateDependencyData()
protected method
This method returns the value of the global state.
protected generateDependencyData ( Cache $cache ) : mixed |
$cache |
Cache |
the cache component that is currently evaluating this dependency |
return |
mixed |
the data needed to determine if dependency has been changed. |
Property Details
the application component ID of the DB connection.
$params public_oe property
the parameters (name => value) to be bound to the SQL statement specified by [[sql]].
the SQL query whose result is used to determine if the dependency has been changed.
Only the first row of the query result will be used.