| 1 | <?php |
||
| 11 | class APIKeyCachePoolThrottle extends CachePoolThrottle |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $keyPrefix; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * APIKeyCachePoolThrottle constructor. |
||
| 20 | * @param CacheItemPoolInterface $cacheItemPool |
||
| 21 | * @param int $limit |
||
| 22 | * @param int $perXSeconds |
||
| 23 | * @param string $keyPrefix |
||
| 24 | */ |
||
| 25 | 8 | public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '') |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @param APIRequest $request |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 7 | protected function deriveCacheKey(APIRequest $request): string |
|
| 39 | } |
||
| 40 |