Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No guzzle delay if cached #112

Open
gmmedia opened this issue Sep 26, 2018 · 1 comment
Open

No guzzle delay if cached #112

gmmedia opened this issue Sep 26, 2018 · 1 comment
Labels

Comments

@gmmedia
Copy link

gmmedia commented Sep 26, 2018

Hallo,
I use a delay in the guzzle config to avoid 429 Too Many Requests errors.

    $config = [
        'handler' => $stack,
        'delay' => 700,
    ];

That delay is not necessary if the file cache is used.

Is it possible to use no delay if the guzzle-cache-middleware returns the cached file?

thanks
Jochen

@Kevinrob
Copy link
Owner

Hi,
Are you sure that the delay impact the response from the cache?
I looked into the source of Guzzle and I thought that it only delay the real call to the network.
=> https://github.com/guzzle/guzzle/blob/003757426cdd50fbad1c34cdbcc8a55f70a4fe8b/src/Handler/CurlHandler.php#L36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants