1 | <?php |
||
19 | abstract class AbstractHandler |
||
20 | { |
||
21 | /** |
||
22 | * @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface |
||
23 | */ |
||
24 | protected $cache; |
||
25 | |||
26 | /** |
||
27 | * @var \eZ\Publish\SPI\Persistence\Handler |
||
28 | */ |
||
29 | protected $persistenceHandler; |
||
30 | |||
31 | /** |
||
32 | * @var \eZ\Publish\Core\Persistence\Cache\PersistenceLogger |
||
33 | */ |
||
34 | protected $logger; |
||
35 | |||
36 | /** |
||
37 | * Setups current handler with everything needed. |
||
38 | * |
||
39 | * @param \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface $cache |
||
40 | * @param \eZ\Publish\SPI\Persistence\Handler $persistenceHandler |
||
41 | * @param \eZ\Publish\Core\Persistence\Cache\PersistenceLogger $logger |
||
42 | */ |
||
43 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * Helper for getting multiple cache items in one call and do the id extraction for you. |
||
55 | * |
||
56 | * Cache items must be stored with a key in the following format "${keyPrefix}${id}", like "ez-content-info-${id}", |
||
57 | * in order for this method to be able to prefix key on id's and also extract key prefix afterwards. |
||
58 | * |
||
59 | * @param array $ids |
||
60 | * @param string $keyPrefix |
||
61 | * |
||
62 | * @return array Format [id[] $cacheMisses, CacheItem[<id>] $list], list contains hits & misses (if there where any). |
||
63 | */ |
||
64 | final protected function getMultipleCacheItems(array $ids, string $keyPrefix): array |
||
91 | } |
||
92 |