public function client(array $config = array(), $lifetime = null)
    {    
        if(is_null($lifetime))
        {
            $lifetime = $this->lifetime;
        }

        $client = new Client($config);

        $emitter = $client->getEmitter();

        $subscriber = new CacheSubscriber($this->cache, $lifetime, $this->cachePrefix);

        $emitter->attach($subscriber);
        
        return $client;
    }