public static function clientCache(CacheItemPoolInterface $pool, StreamFactory $streamFactory, array $config = [])
    {
        // Allow caching of private requests
        if (isset($config['respect_response_cache_directives'])) {
            $config['respect_response_cache_directives'][] = 'no-cache';
            $config['respect_response_cache_directives'][] = 'max-age';
            $config['respect_response_cache_directives'] = array_unique($config['respect_response_cache_directives']);
        } else {
            $config['respect_response_cache_directives'] = ['no-cache', 'max-age'];
        }

        return new self($pool, $streamFactory, $config);
    }
public static function clientCache(CacheItemPoolInterface $pool, StreamFactory $streamFactory, array $config = [])
    {
        // Allow caching of private requests
        if (isset($config['respect_response_cache_directives'])) {
            $config['respect_response_cache_directives'][] = 'no-cache';
            $config['respect_response_cache_directives'][] = 'max-age';
            $config['respect_response_cache_directives'] = array_unique($config['respect_response_cache_directives']);
        } else {
            $config['respect_response_cache_directives'] = ['no-cache', 'max-age'];
        }

        return new self($pool, $streamFactory, $config);
    }
public static function clientCache ( CacheItemPoolInterface $ pool , StreamFactory $ streamFactory , array $ config = [ ] ) { // Allow caching of private requests if ( isset ( $ config [ 'respect_response_cache_directives' ] ) ) { $ config [ 'respect_response_cache_directives' ] [ ] = 'no-cache' ; $ config [ 'respect_response_cache_directives' ] [ ] = 'max-age' ; $ config [ 'respect_response_cache_directives' ] = array_unique ( $ config [ 'respect_response_cache_directives' ] ) ; } else { $ config [ 'respect_response_cache_directives' ] = [ 'no-cache' , 'max-age' ] ; } return new self ( $ pool , $ streamFactory , $ config ) ; }
This method will setup the cachePlugin in client cache mode. When using the client cache mode the plugin will
cache responses with `private` cache directive.

@param CacheItemPoolInterface $pool
@param StreamFactory          $streamFactory
@param array                  $config        For all possible config options see the constructor docs

@return CachePlugin
This method will setup the cachePlugin in client cache mode . When using the client cache mode the plugin will cache responses with private cache directive .