1 | <?php declare(strict_types=1); |
||
14 | class CachedProvider implements ProxyProviderInterface |
||
15 | { |
||
16 | const CACHE_KEY = 'wolnosciowiec.webproxy.cache'; |
||
17 | |||
18 | /** |
||
19 | * @var ProxyProviderInterface $provider |
||
20 | */ |
||
21 | private $provider; |
||
22 | |||
23 | /** |
||
24 | * @var Cache |
||
25 | */ |
||
26 | private $cache; |
||
27 | |||
28 | public function __construct(Cache $cache, ProxyProviderInterface $provider) |
||
37 | |||
38 | public function collectAddresses(): array |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | private function getFromCache(): array |
||
67 | |||
68 | private function cacheResult(array $addresses) |
||
75 | |||
76 | /** |
||
77 | * @return int |
||
78 | */ |
||
79 | protected function getExpirationTime(): int |
||
83 | } |