framework/caching/MemCache.php
protected function setValues($data, $duration)
    {
        if ($this->useMemcached) {
            // Use UNIX timestamp since it doesn't have any limitation
            // @see https://secure.php.net/manual/en/memcache.set.php
            // @see https://secure.php.net/manual/en/memcached.expiration.php
            $expire = $duration > 0 ? $duration + time() : 0;

            // Memcached::setMulti() returns boolean
            // @see https://secure.php.net/manual/en/memcached.setmulti.php
            return $this->_cache->setMulti($data, $expire) ? [] : array_keys($data);
        }

        return parent::setValues($data, $duration);
    }
protected function setValues($data, $duration)
    {
        if ($this->useMemcached) {
            // Use UNIX timestamp since it doesn't have any limitation
            // @see https://secure.php.net/manual/en/memcache.set.php
            // @see https://secure.php.net/manual/en/memcached.expiration.php
            $expire = $duration > 0 ? $duration + time() : 0;

            // Memcached::setMulti() returns boolean
            // @see https://secure.php.net/manual/en/memcached.setmulti.php
            return $this->_cache->setMulti($data, $expire) ? [] : array_keys($data);
        }

        return parent::setValues($data, $duration);
    }
protected function setValues ( $ data , $ duration ) { if ( $ this -> useMemcached ) { // Use UNIX timestamp since it doesn't have any limitation // @see https://secure.php.net/manual/en/memcache.set.php // @see https://secure.php.net/manual/en/memcached.expiration.php $ expire = $ duration > 0 ? $ duration + time ( ) : 0 ; // Memcached::setMulti() returns boolean // @see https://secure.php.net/manual/en/memcached.setmulti.php return $ this -> _cache -> setMulti ( $ data , $ expire ) ? [ ] : array_keys ( $ data ) ; } return parent :: setValues ( $ data , $ duration ) ; }
Stores multiple key-value pairs in cache.
@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 .