@param string $key
@param string $value
@param int    $ttl

@return void
173202
public function do_set($key, $value, $ttl)
    {
        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        $redis->set($this->_prefix . $key, $value, $ttl);
    }
983718
public function set($key, $value, $ttl)
    {
        $filename = $this->_hash(array($key));

        return (bool) $this->_write($filename, $value, null, $ttl);
    }
2710
protected function doSet(string $key, $value, int $ttl = 0)
    {
        if ($ttl > 0) {
            $ttl = \time() + $ttl;
        }

        $filename = $this->getFilename($key);
        $content = '<?php /* ' . Serialize::encode([
                'value' => $value,
                'expire' => $ttl,
            ]) . ' */';

        return $this->storage->put($filename, $content);
    }
1208366
public function set($key, $value, $ttl = null)
    {
        if ($ttl) {
            $ttl = $ttl->getTimestamp() - (new \DateTime('now', new \DateTimeZone('UTC')))->getTimestamp();
            $this->getRedis()->setex($key, $ttl, $value);
        } else {
            $this->getRedis()->set($key, $value);
        }

        return $this;
    }
306149
public function set($key, $value, $ttl)
    {
        $this->initializeOnDemand();

        if (!is_string($key)) {
            throw new InvalidArgumentException(sprintf('Argument #1 must be a string and only, received "%s"', gettype($key)));
        }

        $time = time();

        if ($this->has($key)) {
            $this->cacheMapper->update($key, $value, $ttl);
        } else {
            $this->cacheMapper->insert($key, $value, $ttl, $time);
        }

        // For the current request
        $this->cache[$key] = array(
            ConstProviderInterface::CACHE_PARAM_VALUE => $value,
            ConstProviderInterface::CACHE_PARAM_CREATED_ON => $time,
            ConstProviderInterface::CACHE_PARAM_TTL => $ttl
        );

        return true;
    }
1255778
public function set($key, $value, $ttl)
    {
        if (!$this->memcached->set($key, $value, $ttl)) {
            // If set() returns false, that means the key already exists,
            return $this->memcached->replace($key, $value, $ttl);
        } else {
            // set() returned true, so the key has been set successfully
            return true;
        }
    }
53805
public function set($key, $value, $ttl = false)
    {
        return apc_store($key, $value, (int)$ttl);
    }
592877
public function set($key, $value, $ttl = null)
	{
	    if (!$this->connect()) {
	        return null;
	    }
	    //\Wslim\Ioc::logger('cache')->debug(sprintf('set: %s %s', $key, print_r($value, true)));
	    
		$oldKey = $key;
		
		$key = $this->formatKey($key);
		$value = $this->encodeValue($value);		
		$ttl = $ttl ? $ttl : $this->options['ttl'];

		$result = $this->driver->set($key, $value, MEMCACHE_COMPRESSED, $ttl);
		
		return $result;
	}
719020
public function setResult($key, $result, $ttl)
    {
        if (!($ttl instanceof Ttl)) {
            $ttl = new Ttl($ttl);
        }

        $expirationTimestamp = time() + $ttl->getTtl();
        $value = new Value($result, $expirationTimestamp);

        $this->valueStore->set($key, $value, $ttl->getRealTtl());
    }
515579
public function saveItem($key, $value, $ttl = null)
    {
        $_SESSION['__CACHE__'][$key] = json_encode([
            'start' => time(),
            'ttl'   => ($ttl !== null) ? (int) $ttl : $this->ttl,
            'value' => $value,
        ]);

        return $this;
    }
1220329
public function setCache($key, $value, $ttl = 0)
    {
        $cache_function = $this->set_cache_callback;

        return $cache_function($this->cache_type, array('key' => $key, 'value' => $value, 'ttl' => $ttl));
    }
141021
public function store($key, $value, $ttl = self::DEFAULT_TTL) {
        apc_store($key, $value, (int) $ttl);
        return $value;
    }
1257091
public function set($key, $value, $ttl = null)
    {
        return $this->_instance->set($key, $value, $ttl);
    }
929287
public function set($key, $value, $ttl)
    {
        $curlHandler = $this->curlHandler($key . '?ttl=' . $ttl . 's');

        \curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, true);
        \curl_setopt($curlHandler, CURLOPT_POST, true);
        \curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $value);

        $response = \curl_exec($curlHandler);
        \curl_close($curlHandler);
        return $response;
    }
600771
public function set($key, $value, $ttl = self::DEFAULT_TTL)
    {
        if (!$this->hasConnection()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        $flag = null;

        if (!is_bool($value) && !is_int($value) && !is_float($value)) {
            $flag = MEMCACHE_COMPRESSED;
        }

        try {
            return $this->memcache->set($key, $value, $flag, $ttl);
        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }
466288
public function update($value, $ttl = null)
    {
        $queryKeys = $this->prepareKeys(false);

        if (count($queryKeys)) {
            return $this->updateBatchProxy($queryKeys, $value, $ttl);
        }

        return false;
    }
1141041
public function set($key, $value, $ttl = null)
    {
        try {
            $this->_set($key, $value, $ttl);
        } catch (RootException $e) {
            if ($e instanceof ContainerExceptionInterface) {
                throw $e;
            }

            throw $this->_createContainerException($this->__('Could not set data'), null, $e, $this);
        }
    }