public cache ( integer $duration = null, yii\caching\Dependency $dependency = null ) | ||
$duration | integer | the number of seconds that query result of this command can remain valid in the cache. If this is not set, the value of [[Connection::queryCacheDuration]] will be used instead. Use 0 to indicate that the cached data will never expire. |
$dependency | yii\caching\Dependency | the cache dependency associated with the cached query result. |