Jamm\Memory\RedisObject::read_value PHP Method

read_value() protected method

protected read_value ( $key, &$ttl_left ) : mixed | string
$key
$ttl_left
return mixed | string
    protected function read_value($key, &$ttl_left = -1)
    {
        $value = $this->redis->get($this->prefix . $key);
        if ($this->redis->Exists($this->serialize_key_prefix . $key)) {
            $value = unserialize($value);
        }
        if ($ttl_left !== -1) {
            $ttl_left = $this->redis->TTL($this->prefix . $key);
            if ($ttl_left < 0) {
                $ttl_left = 0;
            }
        }
        return $value;
    }