protected function getDataFromCache($key) {
        $self = $this;
        return (new Promise(function($r, $c) use ($self, $key) {
            $self->cache
                ->get($key)
                ->then(function($data) {
                    return $data !== null ? $data : reject(null);
                })->then(function($data) use ($r) {
                    $r($data);
                }, function() use ($c, $key) {
                    $message = sprintf('Failed to get session data from cache for "%s"', $key);
                    $c(new SessionException($message));
                });
        }));
    }