cache() public method
Enables query cache for this command.
public $this cache ( $duration = null, $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 yii\db\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. |
return | $this |
The command object itself |
Please login to continue.