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
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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