guzzle-cache-middleware
guzzle-cache-middleware copied to clipboard
No guzzle delay if cached
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
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