@param string   $key
@param callable $callback
@param int|null $ttl
@param array    $tags
@param bool     $prolong

@return bool|null
@throws \Exception
@throws \TypeError
16308
public static function fill(string $key, callable $callback, ?int $ttl = null, array $tags = [], bool $prolong = false)
        {
            if (($data = self::get($key)) !== false) {
                if ($prolong) {
                    self::prolong($key);
                }

                return $data;
            }

            $data = null;

            $callback($data);

            self::set($key, $data, $ttl, $tags);

            return $data;
        }
372859
public function remember(string $key, \Closure $getValueCallback, int $expire = null)
    {
        if (($fromCache = $this->get($key)) !== false) {
            return $fromCache;
        }

        $this->set($key, $value = $getValueCallback(), $expire);

        return $value;
    }
387274
public function put($key, $value, $ttl = null)
    {
        if ($ttl === null) {
            return $this->forever($key, $value);
        }

        $this->pushStandardKeys($this->tags->getNamespace(), $key);

        return parent::put($key, $value, $ttl);
    }
1329502
public function add($key, $var = null, $ttl = 0)
	{
		if(isset($this->data[$key])) {
			return false;
		}

		return $this->store($key, $var, $ttl);
	}
226870
public function reject(callable $callback, $keepKey = false)
    {
        return $this->bindNewInstance(Arr::reject($this->convertArray($this), $callback, $keepKey));
    }
544096
public static function add(string $key, $data, ?int $ttl = null, array $tags = []) :bool
        {
            if ($tags) {
                foreach ($tags as $arrKey => $tagName) {
                    unset($tags[$arrKey]);

                    $tags[$tagName] = self::tagGetVer($tagName);
                }
            }

            $ttl    = $ttl === null ? self::$ttlDefault : ($ttl > self::$ttlMax ? self::$ttlMax : $ttl);
            $expire = $ttl ? time() + $ttl : 0;

            return self::GetInstance()->add("\$vxnKey:{$key}",
                                            [
                                                '$_data'   => $data,
                                                '$_tags'   => $tags,
                                                '$_ttl'    => $ttl,
                                                '$_expire' => $expire,
                                            ],
                                            null,
                                            $expire);
        }
1108623
public function set($key, array $tags, $data)
    {
        $key = $this->redis->prefix($key);
        $this->redis->set($key, $this->encoder->encode($data));

        if (is_int($this->expirationTime) && $this->expirationTime > 0) {
            $this->redis->expire($key, $this->expirationTime);
        }

        foreach ($tags as $tag) {
            $this->redis->sadd($this->redis->prefix($tag), $key);
        }
    }
62701
protected function setTags($key, array $tags = [])
    {
        if (empty($tags)) {
            return;
        }

        foreach ($this->prepareTags($tags) as $tag) {
            if (($keys = $this->storage->get($tag)) !== false) {
                $keys = $this->unserialize($keys);
                if (in_array($key, $keys, true)) {
                    continue;
                }
                $keys[] = $key;
                $this->setInternal($tag, $this->serialize($keys), 0);
                continue;
            }
            $this->setInternal($tag, $this->serialize((array)$key), 0);
        }
    }
911806
public function parseShortcode(string $content, array $tags, Closure $callback = null)
    {
        if (strpos($content, '[') === false && empty($tags)) {
            return is_null($callback) ? [] : $content;
        }

        $regex = $this->getRegex($tags);

        preg_match_all("/$regex/", $content, $matches, PREG_SET_ORDER);

        if (is_null($callback)) {
            return iterator_to_array($this->generateResults($matches));
        }

        return preg_replace_callback("/$regex/", $this->generateCallback($callback), $content);
    }
731656
public function start($key, array $tags=[])
    {
        if ($this->isExists($key)) {
            throw new TimerExistException('The Timer is allready started: '. $key);
        }

        $this->setTimer($key, $this->pinba()->timerStart($tags));

        return $this;
    }
633015
public function capture_append( $key, $callback ) 
	{
		return $this->set( $key, $this->get( $key, '' ).CCStr::capture( $callback, $this ) );
	}
384504
public function rememberForever($key, Closure $callback)
    {
        if (is_array($key)) {
            return $this->rememberManyForever($key, $callback);
        }

        return parent::rememberForever($key, $callback);
    }
1296490
public function setTtl($key, $ttl) {
        $redis = $this->_getRedisClient();
        $redis->expire($this->_getInternalKey($key), $ttl);
    }
1249678
public function rememberForever($key, Closure $callback)
    {
        $value = $this->get($key);

        // If the item exists in the cache we will just return this immediately
        // and if not we will execute the given Closure and cache the result
        // of that forever so it is available for all subsequent requests.
        if (! is_null($value)) {
            return $value;
        }

        $this->forever($key, $value = $callback());

        return $value;
    }
712176
public function execute($key, callable $callback)
    {
        $this->acquire($key);
        try {
            $callback();
        } finally {
            $this->release($key);
        }
    }
1065840
public function ttl($key) {
        try {
            $result = $this->getRedis()->pttl($key);
            return ($result != -1) ? $result : false;
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
1062797
public static function apply($key, $callback, $default = NULL) {
		$value = self::get ( $key, $default );
		if (is_string ( $callback ) && function_exists ( $callback )) {
			$value = call_user_func ( $callback, $value );
		} elseif (is_callable ( $callback )) {
			$value = $callback ( $value );
		} else {
			return $value;
		}
		return self::set ( $key, $value );
	}