system/Cache/Handlers/MemcachedHandler.php
public function save(string $key, $value, int $ttl = 60)
	{
		$key = $this->prefix . $key;

		if (! $this->config['raw'])
		{
			$value = [
				$value,
				time(),
				$ttl,
			];
		}

		if ($this->memcached instanceof \Memcached)
		{
			return $this->memcached->set($key, $value, $ttl);
		}
		elseif ($this->memcached instanceof \Memcache)
		{
			return $this->memcached->set($key, $value, 0, $ttl);
		}

		return false;
	}
public function save(string $key, $value, int $ttl = 60)
	{
		$key = $this->prefix . $key;

		if (! $this->config['raw'])
		{
			$value = [
				$value,
				time(),
				$ttl,
			];
		}

		if ($this->memcached instanceof \Memcached)
		{
			return $this->memcached->set($key, $value, $ttl);
		}
		elseif ($this->memcached instanceof \Memcache)
		{
			return $this->memcached->set($key, $value, 0, $ttl);
		}

		return false;
	}
Saves an item to the cache store.

@param string  $key   Cache item name
@param mixed   $value The data to save
@param integer $ttl   Time To Live, in seconds (default 60)

@return mixed