PHP Класс yii\caching\TagDependency

By calling TagDependency::invalidate, you can invalidate all cached data items that are associated with the specified tag name(s).
С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends yii\caching\Dependency
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$tags a list of tag names for this dependency. For a single tag, you may specify it as a string.

Открытые методы

Метод Описание
invalidate ( Cache $cache, string | array $tags ) Invalidates all of the cached data items that are associated with any of the specified [[tags]].
isChanged ( $cache )

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

Метод Описание
generateDependencyData ( Cache $cache ) : mixed Generates the data needed to determine if dependency has been changed.
getTimestamps ( Cache $cache, string[] $tags ) : array Returns the timestamps for the specified tags.
touchKeys ( Cache $cache, string[] $keys ) : array Generates the timestamp for the specified cache keys.

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

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

This method does nothing in this class.
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.

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

Returns the timestamps for the specified tags.
protected getTimestamps ( Cache $cache, string[] $tags ) : array
$cache Cache
$tags string[]
Результат array the timestamps indexed by the specified tags.

invalidate() публичный статический Метод

Invalidates all of the cached data items that are associated with any of the specified [[tags]].
public static invalidate ( Cache $cache, string | array $tags )
$cache Cache the cache component that caches the data items
$tags string | array

isChanged() публичный Метод

public isChanged ( $cache )

touchKeys() защищенный статический Метод

Generates the timestamp for the specified cache keys.
protected static touchKeys ( Cache $cache, string[] $keys ) : array
$cache Cache
$keys string[]
Результат array the timestamp indexed by cache keys

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

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

a list of tag names for this dependency. For a single tag, you may specify it as a string.
public $tags