Sets some information against the cache (session) for later retrieval

@param string|int $key
@param mixed $information
173473
public function set($key, $information) {
        global $USER;
        $this->ensure_session_cache_initialised();
        $information = serialize($information);
        $this->session[$key]= array(self::CACHETIME=>time(), self::CACHEUSERID=>$USER->id, self::CACHEVALUE=>$information);
    }
1030155
public function setKey($key)
    {
        $this->hash = null;

        if (empty($key)) {
            $this->key = null;
            return;
        }

        $this->key = (string) $key;
        $this->hash = $this->makeHash($key);
    }
30317
public function set($key,$value)
    {
        $file=$this->getCacheDir().$key;
        file_put_contents($file, serialize($value));
    }
198522
public function setByKey($key, $value)
    {
        $storage = $this->getStorage();
        if ($value !== '' && $value !== null) {
            $storage[$key] = $value;
        } else {
            unset($storage[$key]);
        }
        $this->setStorage($storage);
    }
1247172
public function forget($key)
        {
            $this->_cleanCache();
            $res = Data::query('cache', 'key = ' . $key . ' && namespace = ' . $this->namespace);
            if (count($res)) {
                $obj = Data::getObject(current($res));
                $del = Data::delete('cache', $obj->getId());
            }
        }
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 );
	}
910843
function setKey($key) {
		$this->cnxn->confirmTransaction('setKey');
		$currKey = $this->key;
		if (!is_null($currKey) && is_null($key)) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
		} else if (is_null($currKey) && !is_null($key)) {
			$this->cnxn->registerStructWithKey($this, $key);
		} else if ($currKey != $key) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
			$this->cnxn->registerStructWithKey($this, $key);
		}
		$this->key = $key;
	}
943559
public function setKey($key)
    {
        $key = $this->chiper->encrypt($key);
        if (file_exists($this->getFilePath())) {
            $f = fopen($this->getFilePath(), 'w');
            fwrite($f, $key);
            fclose($f);

            return;
        }
        parent::setKey(1);
    }
131665
public function addInfo($info) : void
    {
        Assert::isInstanceOfAny($info, [Chunk::class, KeyInfo::class]);
        $this->info[] = $info;
    }
344258
public function set(string $key, $value)
    {
        $array = &$this->input;
        $keys = explode('.', $key);

        while (count($keys) > 1) {
            $k = array_shift($keys);
            if (!isset($array[$k]) || ! is_array($array[$k])) {
                $array[$k] = [];
            }
            $array = &$array[$k];
        }

        $array[array_shift($keys)] = $value;
        $this->cache[$key] = &$value;
    }
3899
public static function remove($key) {
        static::init();
        if (isset($_SESSION[self::$prepend . $key]))
            unset($_SESSION[self::$prepend . $key]);
    }
681481
public function forget($key)
    {
        $this->fire('forgetting', $key, [$key]);

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

        $this->repository->forget($generatedKey);

        if ($this->isCacheEnabled()) {
            $this->cache->forget($generatedKey);
        }

        $this->fire('forget', $key, [$key]);

        $this->context(null);
    }
946393
private function setToCache(string $key, $value, $ttl = null): void
    {
        $params = func_get_args();

        // Use default TTL if none is provided
        if ($this->cacheTTL && $ttl === null) {
            array_push($params, $this->cacheTTL);
        }

        call_user_func_array([$this->cache(), 'set'], $params);
    }
430380
public static function set(string $key, $value) : void
    {
        $_SESSION[Notification::SESSION_KEY][$key] = $value;
    }
128170
public static function destroy($key = '')
    {
        if (self::$_sessionStarted == true) {

            if (empty($key)) {
                session_unset();
                session_destroy();
            } else {
                self::setPrefix();
                unset($_SESSION[self::$_sessionPrefix . $key]);
            }
        }
    }
802318
public function delete($key)
    {
        $this->initSession();
        $key_name = $this->getSessionKeyName($key);
        unset($_SESSION[$key_name]);
    }
669714
protected function setSessionData(string $key, ?string $value = null)
    {
        if (!$value) {
            unset($_SESSION['key']);
            return;
        }

        $_SESSION[$key] = $value;
    }