kevinrob/guzzle-cache-middleware
RFC 7234-compliant HTTP cache middleware for Guzzle 6+. Add to a HandlerStack to transparently cache responses and speed up API calls. Supports PSR-7 and multiple backends: Laravel Cache, Flysystem, PSR-6/16, and WordPress object cache.
API Performance Optimization:
Cost Efficiency:
Roadmap Prioritization:
config('app.enable_api_cache')) for gradual rollout.Use Cases:
Compliance & Standards:
Adopt When:
Look Elsewhere If:
"This package lets us cache external API responses—like payment gateways or third-party data feeds—reducing latency and cloud costs. For example, if our checkout flow calls Stripe 10x/day per user, caching responses could cut API calls by 90%, saving thousands annually. It’s a low-risk, high-reward optimization that aligns with our performance and cost-efficiency goals. Implementation is minimal (a few lines of code), and it plays well with our existing Laravel/Redis stack."
Metrics to Track:
*"This is a battle-tested Guzzle middleware for HTTP caching that supports:
Cache-Control, ETag, Vary headers).Why not build it?
HandlerStack—no major architectural changes.Proposal:
Risks:
Alternatives Considered:
Next Steps:
POST/PUT requests)."*How can I help you explore Laravel packages today?