PHP Класс 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.
С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends yii\caching\Dependency
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Защищенные методы

Метод Описание
generateDependencyData ( Cache $cache ) : mixed Generates the data needed to determine if dependency has been changed.

Описание методов

generateDependencyData() защищенный Метод

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
Результат mixed the data needed to determine if dependency has been changed.

Описание свойств

$db публичное свойство

the application component ID of the DB connection.
public $db

$params публичное свойство

the parameters (name => value) to be bound to the SQL statement specified by [[sql]].
public $params

$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.
public $sql