guzzle-cache-middleware
guzzle-cache-middleware copied to clipboard
Add support for PSR-3 logger
trafficstars
Guzzle 6 has a good support for logging. Configuring HTTP client, you can easily log a lot of details.
When this middleware is used, it's impossible to hook into request / response process and log that request / response was cached.
You can use the normal guzzle logger and log the custom header this middleware adds:
...
new MessageFormatter("... CACHE={res_header_X-Kevinrob-Cache}");
...