1 | <?php |
||
7 | class CacheCircuitBreakerStore implements CircuitBreakerStoreInterface |
||
8 | { |
||
9 | const KEY_BASE = 'circuit_breaker_'; |
||
10 | |||
11 | /** @var Cache */ |
||
12 | private $cache; |
||
13 | |||
14 | public function __construct(Cache $cache) |
||
18 | |||
19 | public function isAvailable(string $identifier): bool |
||
23 | |||
24 | public function reportFailure(string $identifier, int $attemptsThreshold, int $attemptsTtl, int $failureTtl): void |
||
38 | |||
39 | public function reportSuccess(string $identifier): void |
||
44 | } |
||
45 |