Code Duplication    Length = 12-13 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/AbstractHandler.php 1 location

@@ 103-114 (lines=12) @@
100
101
        // Load missing items, save to cache & apply to list if found
102
        $loadedList = $missingLoader($cacheMisses);
103
        foreach ($cacheMisses as $id) {
104
            if (isset($loadedList[$id])) {
105
                $this->cache->save(
106
                    $list[$id]
107
                        ->set($loadedList[$id])
108
                        ->tag($loadedTagger($loadedList[$id]))
109
                );
110
                $list[$id] = $loadedList[$id];
111
            } else {
112
                unset($list[$id]);
113
            }
114
        }
115
116
        return $list;
117
    }

eZ/Publish/Core/Persistence/Cache/AbstractTrait.php 1 location

@@ 87-99 (lines=13) @@
84
85
        // Load missing items, save to cache & apply to list if found
86
        $backendLoadedList = $backendLoader($cacheMisses);
87
        foreach ($cacheMisses as $id) {
88
            if (isset($backendLoadedList[$id])) {
89
                $this->cache->save(
90
                    $list[$id]
91
                        ->set($backendLoadedList[$id])
92
                        ->tag($cacheTagger($backendLoadedList[$id]))
93
                );
94
                $list[$id] = $backendLoadedList[$id];
95
            } else {
96
                // not found
97
                unset($list[$id]);
98
            }
99
        }
100
101
        $this->logger->logCacheMiss($cacheMisses, 3);
102