public function setCache(?CacheInterface $cache)
    {
        if (!$cache) {
            $cache = new VoidCachePool();
        }
        $this->cache = $cache;

        return $this;
    }
public function setCache(?CacheInterface $cache)
    {
        if (!$cache) {
            $cache = new VoidCachePool();
        }
        $this->cache = $cache;

        return $this;
    }
public function setCache ( ? CacheInterface $ cache ) { if ( ! $ cache ) { $ cache = new VoidCachePool ( ) ; } $ this -> cache = $ cache ; return $ this ; }
Sets the current cache.

@param CacheInterface|null $cache

@return Client
Sets the current cache .