$dependency public property
The dependency that the cached content depends on. This can be either a yii\caching\Dependency object or a configuration array for creating the dependency object. For example,
[ 'class' => 'yii\caching\DbDependency', 'sql' => 'SELECT MAX(updated_at) FROM post', ]
would make the output cache depend on the last modified time of all posts. If any post has its modification time changed, the cached content would be invalidated.
If $cacheCookies or $cacheHeaders is enabled, then yii\caching\Dependency::$reusable should be enabled as well to save performance. This is because the cookies and headers are currently stored separately from the actual page content, causing the dependency to be evaluated twice.
public array|yii\caching\Dependency $dependency = null
Please login to continue.