Store multiple items in the cache for a given number of seconds.

@param  array  $values
@param  int  $seconds
@return bool
423686
public function putMany(array $values, $seconds)
    {
        $prefixedValues = [];

        foreach ($values as $key => $value) {
            $prefixedValues[$this->prefix.$key] = $value;
        }

        return $this->memcached->setMulti(
            $prefixedValues, $this->calculateExpiration($seconds)
        );
    }
374378
public function setValues($values=array()) {
		$count=$this->count();
		$isArray=true;
		if (\is_array($values) === false) {
			$values=\array_fill(0, $count, $values);
			$isArray=false;
		}
		if (JArray::dimension($values) == 1 && $isArray)
			$values=[ $values ];

		$count=\min(\sizeof($values), $count);

		for($i=0; $i < $count; $i++) {
			$row=$this->content[$i];
			$row->setValues($values[$i]);
		}
		return $this;
	}
378490
public function displayFor(int $seconds)
	{
		$this->options['t'] = $seconds;
		$this->displayFor = $seconds;

		return $this;
	}
796919
public function maxAge($seconds)
    {
        $this->response = $this->response->withHeader('Access-Control-Max-Age', (int) $seconds);

        return $this;
    }
1237475
public static function setMulti(array $keyValuePairs, int $seconds = null): void
    {
        static::getAdapter()->setMulti($keyValuePairs, $seconds);
    }
1202083
public function store($cacheKey, $value, $minutes = 30)
    {
        $key = array_search($cacheKey, $this->cachedKeys);

        if ($key == false)
        {
            do
            {
                $key = uniqid();
            }
            while ($this->cache->isExisting($key));

            $this->cachedKeys[$key] = $cacheKey;
            $this->storeCachedKeys();
        }

        $this->cache->set($key, $value, $minutes * 60); //=> From seconds
    }
554896
public function expire($key, $seconds)
    {
        $this->init();
        $result = $this->driver->expire($key, $seconds);
        return (bool)$result;
    }
1291760
public function set($key, $value, $second)
    {
        $second = intval($second);

        if (!is_numeric($value)) {
            $value  = serialize($value);
        }

        if ($second > 0) {
            return $this->redisServer->getHashClient($key)->setex($key, $second, $value);
        } else {
            return $this->redisServer->getHashClient($key)->set($key, $value);
        }
    }
307104
public function setTtl(int $seconds): self
    {
        $this->setSharedMaxAge($this->getAge() + $seconds);

        return $this;
    }
235471
public function store($key, $value, $expiry=0) {
		if ($expiry == 0) {
			$expiry = $this->expiry;
		}
		$entry = new CacheItem();

		$entry->value = serialize($value);
		$entry->expireAt = time() + $expiry;
		$data = serialize($entry);

		$this->store->store($key, $data);

		$this->items[$key] = $entry;
	}
744612
public function & SetExpirationSeconds ($seconds = 0) {
		/** @var $this \MvcCore\Session */
		if ($seconds > 0) 
			static::$meta->expirations[$this->__name] = static::$sessionStartTime + $seconds;
		return $this;
	}
854997
public function putMany(array $values, $ttl = null)
    {
        if ($ttl === null) {
            return $this->putManyForever($values);
        }

        return $this->putManyAlias($values, $ttl);
    }
170771
public function store($key, $value, $minute = null)
    {
        return $this->apc->store($key, $value, $minute = null);
    }
925370
public function batchSet(array $values) : bool
        {
        	if (count($values) == 0){
        		return true;
	        }

        	$params = [];
        	foreach ($values as $key=>$value){
        		$params[] = $value;
		        $params[] = $key;
	        }
	        return $this->_redis->zadd($this->_key, $params) > 0 ? true : false;
        }
534165
public final function addSeconds( int $seconds = 1 )
      : DateTime
   {

      return $this->move( new \DateInterval( 'PT' . \abs( $seconds ) . 'S' ), $seconds < 0 );

   }
256262
public function setMultiple($values, $ttl = null, array $tags = []): bool
    {
        if (!is_iterable($values)) {
            throw new CacheException('Argument $values is not iterable.');
        }
        if (!count($values)) {
            return true;
        }
        $this->validateTags($tags);
        $keys = array_keys($values);
        $this->deleteMultiple($keys);
        if ($ttl instanceof \DateInterval) {
            $expire = (new \DateTime('now'))->add($ttl)->getTimeStamp() - time();
        } elseif (is_int($ttl) || ctype_digit($ttl)) {
            $expire = $ttl;
        } else {
            $expire = 0;
        }
        if ($expire < 0) {
            return false;
        }
        $args = [];
        foreach ($values as $key => $value) {
            $args[] = self::PREFIX_KEY_VALUE . $key;
            $args[] = $this->pack($value);
        }
        $this->client->mset(...$args);
        if ($expire) {
            $this->client->evalsha(
                $this->scripts[self::SCRIPT_SET_EXPIRE],
                count($keys),
                ...$keys,
                ...[$expire, self::PREFIX_KEY_VALUE]
            );
        }
        $tags = array_unique(array_values($tags));
        if (count($tags)) {
            $this->client->evalsha(
                $this->scripts[self::SCRIPT_SET_TAGS],
                count($keys),
                ...$keys,
                ...$tags,
                ...[self::PREFIX_KEY_TAGS, self::PREFIX_TAG]
            );
        }
        $args = [[], []];
        foreach ($keys as $key) {
            $args[0][] = $key;
            $args[1][] = crc32($key) % self::SHARDS;
        }
        $this->client->evalsha(
            $this->scripts[self::SCRIPT_SET_SHARDS],
            count($args[0]),
            ...$args[0],
            ...$args[1],
            ...[self::PREFIX_SHARD]
        );
        return true;
    }
1237917
public function put($key, $value, $minutes)
    {
        if ($minutes instanceof \Datetime) {
            $seconds = $minutes->getTimestamp() - time();
        } else {
            $seconds = $minutes * 60;
        }
        $this->redis->setex($this->decorateKey($key), $seconds, $value);
    }