Code Duplication    Length = 6-6 lines in 3 locations

eZ/Publish/Core/Persistence/Cache/AbstractInMemoryHandler.php 3 locations

@@ 144-149 (lines=6) @@
141
142
        // Cache pool
143
        $cacheItem = $this->cache->getItem($key);
144
        if ($cacheItem->isHit()) {
145
            $this->logger->logCacheHit($arguments, 3);
146
            $this->inMemory->setMulti($objects = $cacheItem->get(), $cacheIndexes, $key);
147
148
            return $objects;
149
        }
150
151
        // Backend
152
        $objects = $backendLoader();
@@ 243-248 (lines=6) @@
240
        }
241
242
        // No cache pool misses, cache loaded items in-memory and return
243
        if (empty($cacheMisses)) {
244
            $this->logger->logCacheHit($arguments ?: $ids, 3);
245
            $this->inMemory->setMulti($loaded, $cacheIndexes);
246
247
            return $list;
248
        }
249
250
        // Load missing items, save to cache & apply to list if found
251
        $backendLoadedList = $backendLoader($cacheMisses);
@@ 92-97 (lines=6) @@
89
90
        // Cache pool
91
        $cacheItem = $this->cache->getItem($key);
92
        if ($cacheItem->isHit()) {
93
            $this->logger->logCacheHit($arguments ?: [$id], 3);
94
            $this->inMemory->setMulti([$object = $cacheItem->get()], $cacheIndexes);
95
96
            return $object;
97
        }
98
99
        // Backend
100
        $object = $backendLoader($id);