Store an item.

@param string $cacheId
@param mixed  $value

@return bool
196787
public function setItem($cacheId, $value)
    {
        $cacheId = $this->normalizeKey($cacheId);
        $expire  = $this->cacheExpiration;

        return $this->memcache->set(
            $cacheId,
            $this->compact($value),
            0,
            ($expire === 0) ? $expire : time() + $expire
        );
    }
376514
public function removeItem($cacheId)
    {
        $path = $this->keyPath($cacheId);

        if (!FileUtils::exists($path)) {
            return true;
        }

        return unlink($path);
    }
538227
public function removeItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        $this->memcached->delete($cacheId);

        return (\Memcached::RES_SUCCESS === $this->memcached->getResultCode());
    }
447610
public function setItem(string $cacheId, $content): bool
    {
        // Get the whole PHP code
        $data = [
            'content' => serialize($content),
        ];

        // Save and return
        return $this->cache->set($cacheId, $data);
    }
56247
public function removeItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        return $this->cache->delete($cacheId);
    }
641626
public static function set($cacheName, $value = null, $option = array(), $alias = null)
	{
		$obj = self::getInstance($alias);
		if ($obj)
		{
			return $obj->set($cacheName, $value, $option);
		}
		else
		{
			return false;
		}
	}
1065697
public function saveData($cacheId, $data)
    {
        $file = $this->filePath($cacheId);
        $content = serialize($data);

        return $this->save($file, $content);
    }
34492
public function cache($key, $value, $expire = null)
    {
        $this->_caches[$key] = $value;
        return true;
    }
885866
protected function setCache($cachename,$value,$expired=0){
        $file = $this->cachedir . $cachename . '.cache';
        $data = array(
                'value' => $value,
                'expired' => $expired ? time() + $expired : 0
        );
        return file_put_contents( $file, serialize($data) ) ? true : false;
    }
1116034
private function expired($cacheId)
    {
        $item = $this->cachedItems[$cacheId];
        return (! $this->storage->exists($cacheId)) ||
               $this->timeUtil->expired($item->expiry);
    }
390610
public function store($key, $value)
    {
        $this->load();

        $this->config[$key] = $value;
        return true;
    }
859189
public function setItem(
        $cacheId,
        $value
    ) {
        $path = $this->keyPath($cacheId);

        return FileUtils::write(
            $path,
            $this->compact($value)
        );
    }
904065
public function getItem($cacheId, & $success = null)
    {
        $cacheId = $this->normalizeKey($cacheId);
        $success = false;

        $value = $this->extract($this->memcache->get($cacheId));
        if ($value === null) {
            return null;
        }

        $success = true;

        return $value;
    }
697320
public function valid($cacheId)
    {
        if ($this->isActive() && $this->exists($cacheId)) {
            $fmtime = filemtime($this->filePath($cacheId));
            if (($fmtime + $this->ttl) > time()) {
                return true;
            }
        }

        return false;
    }
788959
public function put(string $key, $value)
    {
        $this->cache[$this->hashKey($key)] = $value;
        return $value;
    }
186655
public function resetCacheKey($cacheKey, $value = false)
    {
        $cache = $this->getCache();
        if ($cache) {
            return $this->getCache()->set($cacheKey, $value);
        }
        return false;
    }
462950
public function setItem($cacheId, $content)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return $this->cache->store($cacheId, serialize($content));
        } catch (ezcBaseException $ex) {
            return false;
        }
    }