php-http/cache-plugin
PSR-6 cache plugin for HTTPlug clients. Automatically caches HTTP responses (and can serve stale on error) with configurable cache strategies, TTL, and cache key generation. Drop it into your plugin chain to cut latency and reduce repeated requests.
Cache-Control/no-cache directives natively.EtagCachePlugin for conditional requests (e.g., If-None-Match).guzzlehttp/guzzle’s cache middleware).guzzlehttp/ringphp + ringphp/cache.symfony/http-client’s built-in cache.For Executives: "This package cuts API costs and speeds up responses by caching external service calls—think of it as a ‘battery’ for your HTTP requests. For example, if our checkout flow makes 5 redundant calls to Stripe per transaction, this could save $20K/year in API fees while slashing latency. It’s zero-maintenance, MIT-licensed, and integrates with our existing Redis setup. No upfront dev cost; ROI is immediate."
For Engineering: *"We’re adding a 5-minute integration to cache external HTTP responses using HTTPlug + PSR-6. Here’s how it works:
CachePlugin (e.g., Guzzle, Symfony HttpClient).Cache-Control, ETag, and Last-Modified headers per RFC 7234.
No new dependencies beyond Redis/Memcached; drops in as a decorator. Example:$cachedClient = (new CachePlugin(new RedisCachePool(), [
'default_ttl' => 3600,
'blacklisted_paths' => ['/api/webhooks*'],
]))->attachTo($httpClient);
Impact: Reduces API calls by ~70% for static data, with zero code changes to existing services."*
For Product Managers: *"This enables us to:
How can I help you explore Laravel packages today?