diff --git a/config/shopify.php b/config/shopify.php index b2fa14b..5f7e11a 100644 --- a/config/shopify.php +++ b/config/shopify.php @@ -38,7 +38,7 @@ 'buffer' => 3, /* - * The request cycle. + * The request cycle / leak rate in percentage per second. */ 'cycle' => 0.5, diff --git a/src/Providers/DefaultRateLimitProvider.php b/src/Providers/DefaultRateLimitProvider.php index d60c277..11279ce 100644 --- a/src/Providers/DefaultRateLimitProvider.php +++ b/src/Providers/DefaultRateLimitProvider.php @@ -65,7 +65,7 @@ public function getRequestTime(RequestInterface $request) */ public function getRequestAllowance(RequestInterface $request) { - return Cache::get($this->prefix . 'request_allowance', 0.5); + return Cache::get($this->prefix . 'request_allowance', config('shopify.rate_limit.cycle')); } /**