Store an item in the cache for a given number of minutes.

@param  string $key
@param  mixed $value
@param  int $seconds
@param  bool $strict

@throws CacheSetException

@return bool
328570
public function set($key, $value, $seconds, $strict = true) {
        $set = $this->memcached->set($key, $value, $seconds);
        if (!$set && $strict) {
            throw new CacheSetException($key);
        }
    }
933369
public function put($key, $value, $minutes = 0) {
        if ($minutes == 0) {
            $this->client->set($key, serialize($value));
        } else {
            $this->client->set($key, serialize($value), null, $minutes * 60);
        }
    }
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;
	}
1328524
public function add($key, $value, $seconds)
    {
        return $this->memcached->add(
            $this->prefix.$key, $value, $this->calculateExpiration($seconds)
        );
    }
1270972
public function set($key, $value, $lifeTime = 900)
    {
        //~ Check if enabled
        if (!$this->isEnabled()) {
            return false;
        }

        //~ Clear expired Cache files
        $this->clearExpired();

        $pKey = $this->prefix() . $key;
        $file = $this->directory . substr(md5($pKey), 0, 10) . '.dat';
        if ((bool) file_put_contents($file, serialize($value))) {
            $this->cache[$pKey] = time() + $lifeTime;
            $this->save();

            return true;
        } else {
            return false;
        }
    }
895909
public function contains($value, $key = null, $strict = false)
    {
        if ($key !== null) {
            foreach ($this->items as $item) {
                $v = isset($item[$key]) ? $item[$key] : null;
                if ((!$strict && $v == $value) || $v === $value) {
                    return true;
                }
            }
            return false;
        }

        if ($this->useAsCallable($value)) {
            return $this->first($value) !== null;
        }

        return in_array($value, $this->items, $strict);
    }
542579
public function put($key, $value, $seconds)
    {
        $this->dynamo->putItem([
            'TableName' => $this->table,
            'Item' => [
                $this->keyAttribute => [
                    'S' => $this->prefix.$key,
                ],
                $this->valueAttribute => [
                    $this->type($value) => $this->serialize($value),
                ],
                $this->expirationAttribute => [
                    'N' => (string) $this->toTimestamp($seconds),
                ],
            ],
        ]);

        return true;
    }
393084
protected function cache($key, $value, $minutes)
    {
        $this->cache->add($this->key($key), $value, Carbon::now()->addMinutes($minutes));
    }
156883
public function store($key, $value = null, int $expiration = 0): bool
    {
        return $this->set($key, $value, $expiration);
    }
658878
public function put($key, $value, $duration, $localOnly = false)
    {
        $cacheKey = $this->cacheKey($key);
        if($this->keepLocalCache)
            $this->localCache[$cacheKey] = $value;
        if(!$localOnly)
            $this->cacheStore->put($cacheKey, $value, $duration);
    }
710090
public function put($key, $value, $duration, $localOnly = false)
    {
        return parent::put($key, $value, $this->cacheExpiration);
    }
715655
public function put($key, $value, $minutes)
    {
        if ($minutes instanceof \Datetime) {
            $seconds = $minutes->getTimestamp() - time();
        } else {
            $seconds = $minutes * 60;
        }

        $this->cache->save($key, $value, $seconds);
    }
518190
public function set($key, $value, $expire = 0)
    {
        if ($this->type === 1) {
            return $this->memcache->set($key, $value, $expire);
        } else {
            return $this->memcache->set($this->conf['prefix'] . $key, json_encode($value, JSON_UNESCAPED_UNICODE), false, $expire);
        }
    }
34492
public function cache($key, $value, $expire = null)
    {
        $this->_caches[$key] = $value;
        return true;
    }
687397
private function setCache(
        string $key, $value, ?int $expires
    ): void {
        $cache = $this->client->getItem($key);
        $cache->set($value);
        $cache->expiresAfter($expires);
        $this->client->save($cache);
    }
257084
public function put(string $key, $value, array $tags, int $seconds = null)
    {
        if (is_null($seconds)) {
            $seconds = $this->seconds;
        }

        return $this->cache->tags($tags)->put($key, $value, $seconds);
    }
1086634
public function put($key, $value, $seconds)
    {
        $this->ensureCacheDirectoryExists($path = $this->path($key));

        $result = $this->files->put(
            $path, $this->expiration($seconds).serialize($value), true
        );

        return $result !== false && $result > 0;
    }