framework/caching/Cache.php
protected function setValues($data, $duration)
    {
        $failedKeys = [];
        foreach ($data as $key => $value) {
            if ($this->setValue($key, $value, $duration) === false) {
                $failedKeys[] = $key;
            }
        }

        return $failedKeys;
    }
protected function setValues($data, $duration)
    {
        $failedKeys = [];
        foreach ($data as $key => $value) {
            if ($this->setValue($key, $value, $duration) === false) {
                $failedKeys[] = $key;
            }
        }

        return $failedKeys;
    }
protected function setValues ( $ data , $ duration ) { $ failedKeys = [ ] ; foreach ( $ data as $ key => $ value ) { if ( $ this -> setValue ( $ key , $ value , $ duration ) === false ) { $ failedKeys [ ] = $ key ; } } return $ failedKeys ; }
Stores multiple key-value pairs in cache.
The default implementation calls [[setValue()]] multiple times store values one by one. If the underlying cache
storage supports multi-set, this method should be overridden to exploit that feature.
@param array $data array where key corresponds to cache key while value is the value stored
@param int $duration the number of seconds in which the cached values will expire. 0 means never expire.
@return array array of failed keys
Stores multiple key - value pairs in cache . The default implementation calls [[ setValue () ]] multiple times store values one by one . If the underlying cache storage supports multi - set this method should be overridden to exploit that feature .