1 | <?php |
||
8 | final class CacheableRpcClient implements RpcClientInterface |
||
9 | { |
||
10 | const DEFAULT_KEY_PREFIX = 'rpc_client_cache'; |
||
11 | |||
12 | /** @var CacheItemPoolInterface */ |
||
13 | private $cache; |
||
14 | /** @var RpcClientInterface */ |
||
15 | private $decoratedClient; |
||
16 | /** @var CacheKeyStrategyInterface */ |
||
17 | private $keyStrategy; |
||
18 | /** @var int|null */ |
||
19 | private $ttl; |
||
20 | |||
21 | /** |
||
22 | * CacheableRpcClient constructor. |
||
23 | * |
||
24 | * @param RpcClientInterface $decoratedClient |
||
25 | * @param CacheItemPoolInterface $cache |
||
26 | * @param int|null $ttl |
||
27 | * @param CacheKeyStrategyInterface|string $strategy |
||
28 | */ |
||
29 | 3 | public function __construct( |
|
43 | |||
44 | /** {@inheritdoc} */ |
||
45 | 3 | public function invoke($calls) |
|
78 | } |
||
79 |