Reset cache key.
@param string $cacheKey
@param mixed $value
@return boolean whether the value is successfully stored into cache. if
cache component was not configured, then return false directly.
186655
public function resetCacheKey($cacheKey, $value = false)
    {
        $cache = $this->getCache();
        if ($cache) {
            return $this->getCache()->set($cacheKey, $value);
        }
        return false;
    }
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;
    }
510907
public function purgeCachedFiles($cacheKey) {
        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Remove the directory
        passthru("rm -rf " . $directory . "/" . $filename);

    }
462950
public function setItem($cacheId, $content)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return $this->cache->store($cacheId, serialize($content));
        } catch (ezcBaseException $ex) {
            return false;
        }
    }
108776
public function set(CacheKey $key, $value, $sessionLength = null) {

        if ($sessionLength == null) {
            $sessionLength = $this->timeThreshold;
        }

        $sKey = $this->getKey($key);

        if (is_array($value) || is_object($value)) {
            $value = serialize($value);
        }

        $this->redis->set($sKey, $value);

        if (!empty($sessionLength) && $sessionLength > 0) {
            $this->redis->expire($sKey, $sessionLength);
        }
    }
1018949
public function set($key, $value)
        {
            if (!$this->enabled) {
                return false;
            }

            switch ($this->type) {
                case self::TYPE_APC:
                    apc_store($key, $value);
                    break;
                case self::TYPE_FILE:
                    $filename = $this->path . $key . '.cache';
                    file_put_contents($filename, serialize($value));
                    break;
            }


            return true;
        }
63500
public function purgeByCacheKey($cacheKey)
    {
        // initialize log
        $log = new DebugLog();
        $log->addMessage('State', 'Purge by cache key');

        // remove the key from index
        $this->indexStorage->deleteEntryByKey($cacheKey);

        // purges from cache storage
        return $this->cacheStorage->purge($cacheKey);
    }
163337
function set($key, $value, $expire = 0)
    {
        if ($this->memcached)
        {
            return $this->cache->set($key, $value, $expire);
        }
        else
        {
            return $this->cache->set($key, $value, $this->flags, $expire);
        }
    }
866282
protected function resetRun(array $cacheKeys)
    {
        parent::__construct(array_merge([
            'select'        => [],
            'union'         => [],
            'unionAll'      => [],
            'into'          => false,
            'distinct'      => false,
            'from'          => [],
            'join'          => [],
            'where'         => [],
            'having'        => [],
            'between'       => [],
            'notBetween'    => [],
            'limit'         => false,
            'offset'        => false,
            'groupBy'       => [],
            'orderBy'       => [],
            'keys'          => [],
            'sets'          => [],
            'binds'         => [],
            'aliasedTables' => [],
            'noEscape'      => [],
            'bracketOpen'   => false,
            'bracketCount'  => 0,
            'statement'     => null,
        ], $cacheKeys), \ArrayObject::ARRAY_AS_PROPS);
    }
919493
public function reset(){
    	$originalSettings = $this->settings;
    	$this->settings = array();
    	if(file_put_contents($this->cacheFileName, "{}") === FALSE){
    		$this->settings = $originalSettings;
    		return FALSE;
    	}
    	return TRUE;
    }
1162148
public function set($key, $value)
    {
        $this->nestedKeyCache = [];

        if ($this->isNestedKey($key)) {
            $this->setNestedValueByKey($key, $value);

            return;
        }

        $this->items[$key] = $value;
    }
131059
protected function resetRun(array $cacheKeys)
    {
        foreach ($cacheKeys as $cacheKey => $cacheDefaultValue) {
            $this->vars[ $cacheKey ] = $cacheDefaultValue;
        }
    }
913826
public function clear(CacheKey $key) {
		if (isset ( $this->elements [$key->getModule()] [$key->getProperty()] )) {
			unset ( $this->elements [$key->getModule()] [$key->getProperty()] );
			$this->changed = true;
		}
	}
867134
public function setToCache($key, $value)
    {
        $fileName = $this->getCacheFilePath($key);
        $cacheDirectory = $this->getCacheDir();

        $tmpFile = $cacheDirectory . "/" . basename($fileName) . uniqid('.temp', true) . '.txt';
        file_put_contents($tmpFile, serialize($value), LOCK_EX);

        rename($tmpFile, $fileName);
    }
338012
public function setCache($key, $value) {
        if($this->cacheEnabled) {
            $this->cacheObj->save($key, $value);
        }
    }
194659
public function delete($key): bool
    {
        if ($this->enabled) {
            $realKey = $this->adjustKey($key);
            return $this->cacheDelete($realKey);
        }
        return false;
    }
379165
protected function _setCached( $key, $value )
	{
		$session = $this->_getContext()->getSession();

		$cached = $session->get( 'arcavias/basket/cache', array() ) + array( $key => true );
		$session->set( 'arcavias/basket/cache', $cached );
		$session->set( $key, $value );
	}