Goutte disable Gzzle caching

I have a problem with Goutte, or is it actually Guzzle part of Goutte.

Guzzle automatically caches every GET call, I tried to disable it but I can't get it to work.

As you can see here, I am parsing the cache parameters directly in the Guzzle constructor.

use Goutte\Client;
use Guzzle\Http\Client as GuzzleClient;

$client = new Client();

$client->setClient(new GuzzleClient('/', array(
    'curl.options' => array(
        CURLOPT_COOKIESESSION => true,
    CURLOPT_COOKIEJAR => 'cookie.txt',
        CURLOPT_FRESH_CONNECT => true,
        CURLOPT_TIMEOUT => 0
    ),
    'params.cache.override_ttl' => 0,
    'params.cache.default_ttl' => 0,
    'params.cache.revalidate'   => 'always'
)));

      

However, this does not make any changes. As for the documentation for the cacheplugin (see: http://guzzlephp.org/guide/http/caching.html )

This code:

echo $client->getClient()->get('/')->getParams()->get('cache.override_ttl');

      

Should output the current value of cache.override_ttl, this should output nothing.

I believe it must be something about the Goutte shell that I am missing. Does anyone have any idea?

+3
php symfony goutte guzzle


source to share


No one has answered this question yet

Check out similar questions:

sixteen
Restricted Guzzle Feed Requests
4
Accessing Guzzle Response by Goutte
2
Joining urls in symfony / goutte
2
Symfony2 + Guzzle + Goutte = URI must be string or UriInterface
1
Can't send ssl ceriticate between client and goutte
1
Configuring Goutte / Guzzle
1
How to disable buzz caching in behat.yml for goutte driver using behat / mink?
1
Goutte / Guzzle proxy not working
0
Fill out the form with goutte / guzzle | Symfony 4
0
Guzl and DomKusler



All Articles
Loading...
X
Show
Funny
Dev
Pics