1 | <?php |
||
26 | class CacheInvalidationListener |
||
27 | { |
||
28 | /** |
||
29 | * Adds a log record about cached proxy list invalidation |
||
30 | * |
||
31 | * @var LoggerInterface |
||
32 | */ |
||
33 | private $logger; |
||
34 | |||
35 | /** |
||
36 | * Invalidates a cache instance |
||
37 | * |
||
38 | * @var CacherInterface |
||
39 | */ |
||
40 | private $cacheInvalidator; |
||
41 | |||
42 | /** |
||
43 | * CacheInvalidationListener constructor. |
||
44 | * |
||
45 | * @param LoggerInterface $logger Adds a log record about cached proxy list invalidation |
||
46 | * @param CacherInterface $cacheInvalidator Invalidates a cache instance |
||
47 | */ |
||
48 | public function __construct(LoggerInterface $logger, CacherInterface $cacheInvalidator) |
||
53 | |||
54 | /** |
||
55 | * Invalidates a proxy list cache if client was unable to establish a connection to website |
||
56 | * |
||
57 | * @param ConnectFailedEvent $event Propagated whenever a HTTP client failed to establish connection to website |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | public function onConnectFailed(ConnectFailedEvent $event): void |
||
80 | } |
||
81 |