Save $value by $key to cache
@param string $key
@param mixed $value
@param int $seconds
@return bool
@throws \ErrorException
176491
public function save(string $key, $value, int $seconds = 0): bool
    {
        if (empty($key)) {
            throw  new \ErrorException('"key" should not be empty!');
        } elseif (!$this->isEnable()) {
            return false;
        }

        $data = $this->read();
        if (!is_array($data)) {
            $data = array();
        }

        $data[$key] = $value;

        return parent::write($data, $seconds ? $seconds : $this->timeout);
    }
1353869
public function get($key, $seconds = 60)
    {
        $result = $this->connection()->setnx($key, 1);

        if ($result === 1) {
            $this->connection()->expire($key, $seconds);
        }

        return $result === 1;
    }
274469
public function store($cacheKey, $value, $minutes = 30)
    {
        $key = array_search($cacheKey, $this->cachedKeys);

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

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

        $this->cache->put($key, $value, $minutes);
    }
118137
public function put($key, $value, $minutes)
	{
		$this->memcache->set($this->prefix.$key, $value, false, $minutes * 60);
	}
580617
public function putMany(array $values, $seconds)
    {
        $manyResult = null;

        foreach ($values as $key => $value) {
            $result = $this->put($key, $value, $seconds);

            $manyResult = is_null($manyResult) ? $result : $result && $manyResult;
        }

        return $manyResult ?: false;
    }
441384
public function waitUntilVue($key, $value, $componentSelector = null, $seconds = null)
    {
        $this->waitUsing($seconds, 100, function () use ($key, $value, $componentSelector) {
            return $value == $this->vueAttribute($componentSelector, $key);
        });

        return $this;
    }
893301
public function put($key, $value, $minutes)
    {
        $key = $this->key . $key;
        $value = serialize($value);
        $expiration = $this->expiration($minutes);

        try {
            $sth = $this->pdo->prepare(
                "INSERT INTO pimf_cache (key, value, expiration) VALUES (:key, :value, :expiration)"
            );

        } catch (\Exception $exception) {
            $sth = $this->pdo->prepare(
                "UPDATE pimf_cache SET value = :value, expiration = :expiration WHERE key = :key"
            );
        }

        $sth->bindValue(':key', $key);
        $sth->bindValue(':value', $value);
        $sth->bindValue(':expiration', $expiration);

        return $sth->execute();
    }
930856
public function put($key, $value, $minutes)
	{
		$file = $this->path($key);

		$data = array(
			'time'  => time(),
			'value' => $value,
			'ttl'   => $this->expiration($minutes)
		);

		return $this->writeCacheFile($file, $data);
	}
1287087
public function put($key, $value, $minutes)
	{
		return eaccelerator_put($this->id($key), $value, $minutes * 60);
	}
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);
    }
505511
public function put(string $key, $value, float $minutes)
    {
        if (is_array($value)) {
            foreach ($value as $index => $document) {
                if ($document instanceof stdClass) {
                    $value[$index] = (array) $document;
                }
            }
        }

        $this->laravelCache->put($key, $value, $minutes);
    }
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);
        }
    }
513049
public function put($key, $value, $minutes = 0) {
        file_put_contents($this->baseDir . '/' . md5($key), serialize($value));
    }
620746
public function expire($key, $seconds)
    {
        Util::checkArgString($key);
        Util::checkArgInteger($seconds);

        try {
            return $this->getAdapter()->expire($key, $seconds);
        } catch (\Exception $e) {
            throw new InternalException($e->getMessage(), $e->getCode(), $e);
        }
    }
104239
public function saveInCache($key, $value)
  {
    $this->deleteFromCache($key);
    $this->memcache->set($this->buildMKey($key), serialize($value));
  }
683147
public function put($key, $value, $minutes = null)
    {
        if (is_array($key)) {
            return $this->putMany($key, $value);
        }

        if (! is_null($minutes = $this->getMinutes($minutes))) {
            $this->store->put($this->itemKey($key), $value, $minutes);

            $this->event(new KeyWritten($key, $value, $minutes));
        }
    }
136667
public function putMany(array $values, $seconds)
    {
        $expiration = $this->toTimestamp($seconds);

        $this->dynamo->batchWriteItem([
            'RequestItems' => [
                $this->table => collect($values)->map(function ($value, $key) use ($expiration) {
                    return [
                        'PutRequest' => [
                            'Item' => [
                                $this->keyAttribute => [
                                    'S' => $this->prefix.$key,
                                ],
                                $this->valueAttribute => [
                                    $this->type($value) => $this->serialize($value),
                                ],
                                $this->expirationAttribute => [
                                    'N' => (string) $expiration,
                                ],
                            ],
                        ],
                    ];
                })->values()->all(),
            ],
        ]);

        return true;
    }