Skip to content

ElementQueryTagDependency ​

Type
Class
Namespace
craft\cache
Inherits
craft\cache\ElementQueryTagDependency » yii\caching\TagDependency » yii\caching\Dependency » yii\base\BaseObject
Implements
yii\base\Configurable
Since
3.7.14

ElementQueryTagDependency is used to determine if an entry query’s cache tags have changed.

View source

Public Properties ​

PropertyDescription
datamixed – The dependency data that is saved in cache and later is compared with the latest dependency data.
elementQuerycraft\elements\db\ElementQuery, null
reusableboolean – Whether this dependency is reusable or not.
tagsstring, array – A list of tag names for this dependency.

elementQuery ​

Type
craft\elements\db\ElementQuery, null
Default value
null

View source

Public Methods ​

MethodDescription
__call()Calls the named method which is not a class method.
__construct()Constructor
__get()Returns the value of an object property.
__isset()Checks if a property is set, i.e. defined and not null.
__set()Sets value of an object property.
__sleep()
__unset()Sets an object property to null.
canGetProperty()Returns a value indicating whether a property can be read.
canSetProperty()Returns a value indicating whether a property can be set.
className()Returns the fully qualified name of this class.
evaluateDependency()Evaluates the dependency by generating and saving the data related with dependency.
getHasChanged()Returns a value indicating whether the dependency has changed.
hasMethod()Returns a value indicating whether a method is defined.
hasProperty()Returns a value indicating whether a property is defined.
init()Initializes the object.
invalidate()Invalidates all of the cached data items that are associated with any of the specified tags.
isChanged()Checks whether the dependency is changed.
resetReusableData()Resets all cached data for reusable dependencies.

__construct() ​

Constructor

View source

Arguments ​

__sleep() ​

View source

Protected Methods ​

MethodDescription
generateDependencyData()Generates the data needed to determine if dependency has been changed.
generateReusableHash()Generates a unique hash that can be used for retrieving reusable dependency data.
getTimestamps()Returns the timestamps for the specified tags.
touchKeys()Generates the timestamp for the specified cache keys.

generateDependencyData() ​

Generates the data needed to determine if dependency has been changed.

This method does nothing in this class.

View source

Arguments ​

Returns ​

mixed – The data needed to determine if dependency has been changed.