caching\Cache multiSet()

multiSet() public method (available since version 2.0.7)

Stores multiple items in cache. Each item contains a value identified by a key.

If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones, respectively.

public boolean multiSet ( $items, $duration = 0, $dependency = null )
$items array

The items to be cached, as key-value pairs.

$duration integer

Default number of seconds in which the cached values will expire. 0 means never expire.

$dependency yii\caching\Dependency

Dependency of the cached items. If the dependency changes, the corresponding values in the cache will be invalidated when it is fetched via get(). This parameter is ignored if $serializer is false.

return boolean

Whether the items are successfully stored into cache

doc_Yii
2016-10-30 16:53:53
Comments
Leave a Comment

Please login to continue.