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.
StreamFactory, only PSR-17 StreamFactoryInterface is now supported.null and use 0 explicitly to calculate expirationnull.StreamFactoryInterface.blacklisted_paths option, which takes an array of strings (regular expressions) and allows to define paths, that shall not be cached in any case.cache_listeners option, which takes an array of CacheListeners, who get notified and can optionally act on a Response based on a cache hit or miss event. An implementation, AddHeaderCacheListener, is provided which will add an X-Cache header to the response with this information.CacheKeyGenerator interface that allow you to configure how the PSR-6 cache key is created. There are two implementations
of this interface: SimpleGenerator (default) and HeaderCacheKeyGenerator.respect_cache_headers is used.methods option which allows to configure the request methods which can be cached.respect_response_cache_directives option to define specific cache directives to respect when handling responses.CachePlugin::clientCache and CachePlugin::serverCache factory methods to easily setup the plugin with
the correct config settigns for each usecase.no-cache directive is now respected by the plugin and will not cache the response. If you need the previous behaviour, configure respect_response_cache_directives.respect_cache_headers option is deprecated and will be removed in 2.0. This option is replaced by the new respect_response_cache_directives option.
If you had set respect_cache_headers to false, set the directives to [] to ignore all directives.default_ttl is changed from null to 0.respect_cache_headers=>false in combination with default_ttl=>null.cache_lifetime to be set to null.hash_algo config option used for cache key generation (defaults to sha1).How can I help you explore Laravel packages today?