1 | <?php |
||
7 | class APIKeyCachePoolThrottle extends CachePoolThrottle |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $keyPrefix; |
||
13 | |||
14 | /** |
||
15 | * APIKeyCachePoolThrottle constructor. |
||
16 | * @param CacheItemPoolInterface $cacheItemPool |
||
17 | * @param int $limit |
||
18 | * @param int $perXSeconds |
||
19 | * @param string $keyPrefix |
||
20 | */ |
||
21 | 8 | public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '') |
|
26 | |||
27 | /** |
||
28 | * @param APIRequest $request |
||
29 | * @return string |
||
30 | */ |
||
31 | 7 | protected function deriveCacheKey(APIRequest $request): string |
|
35 | } |
||
36 |