src/AdminStoreInit.php
protected function store_redis_cache_read($token) {
		if (!$this->redis)
			return null;
		$key = sprintf('%s:%s', $this->token_name, $token);
		$data = $this->redis->get($key);
		if ($data === false)
			# key not fund
			return null;
		$data = @json_decode($data, true);
		if (!$data)
			# cached data is broken
			$data = ['uid' => -2];
		$this->logger->debug(sprintf(
			"Zapmin: session read from cache: '%s' <- '%s'.",
			$token, json_encode($data)));
		return $data;
	}
protected function store_redis_cache_read($token) {
		if (!$this->redis)
			return null;
		$key = sprintf('%s:%s', $this->token_name, $token);
		$data = $this->redis->get($key);
		if ($data === false)
			# key not fund
			return null;
		$data = @json_decode($data, true);
		if (!$data)
			# cached data is broken
			$data = ['uid' => -2];
		$this->logger->debug(sprintf(
			"Zapmin: session read from cache: '%s' <- '%s'.",
			$token, json_encode($data)));
		return $data;
	}
protected function store_redis_cache_read ( $ token ) { if ( ! $ this -> redis ) return null ; $ key = sprintf ( '%s:%s' , $ this -> token_name , $ token ) ; $ data = $ this -> redis -> get ( $ key ) ; if ( $ data === false ) # key not fund return null ; $ data = @ json_decode ( $ data , true ) ; if ( ! $ data ) # cached data is broken $ data = [ 'uid' => - 2 ] ; $ this -> logger -> debug ( sprintf ( "Zapmin: session read from cache: '%s' <- '%s'." , $ token , json_encode ( $ data ) ) ) ; return $ data ; }
Read session data from cache.

@param string $token Session token.
Read session data from cache .