src/Leevel/Throttler/Throttler.php
public function create(?string $key = null, int $limit = 60, int $time = 60): IRateLimiter
    {
        $key = $this->getRequestKey($key);

        if (isset($this->rateLimiter[$key])) {
            return $this->rateLimiter[$key]->
            limit($limit)->

            time($time);
        }

        return $this->rateLimiter[$key] = new RateLimiter(
            $this->cache, $key, $limit, $time
        );
    }
public function create(?string $key = null, int $limit = 60, int $time = 60): IRateLimiter
    {
        $key = $this->getRequestKey($key);

        if (isset($this->rateLimiter[$key])) {
            return $this->rateLimiter[$key]->
            limit($limit)->

            time($time);
        }

        return $this->rateLimiter[$key] = new RateLimiter(
            $this->cache, $key, $limit, $time
        );
    }
创建一个节流器.

@param null|string $key
@param int         $limit
@param int         $time

@return \Leevel\Throttler\IRateLimiter