v2.0.5
版本发布时间: 2018-06-01 02:20:33
hamburgscleanest/guzzle-advanced-throttle最新发布版本:v5.0.1(2021-09-22 01:48:35)
Added
-
You can now provide a custom caching strategy instead of being limited to the default ones.
Your custom caching strategy must implement
CacheStrategy
. It is suggested you useCacheable
for a parent class. This will give a good head start, seeForceCache
andCache
for ideas.To use your custom caching strategy, you'll need to pass the fully qualified cache name to
RequestLimitRuleset
.$rules = new RequestLimitRuleset([ ... ], MyCustomCacheStrategy::class, 'array', new Repository(...)); $throttle = new ThrottleMiddleware($rules);
Thanks to @LightGuard