Exemple #1
0
 public function getListByIds(array $ids, $expires = Cache::EXPIRES_MEDIUM)
 {
     $mapped = $remain = [];
     foreach ($ids as $id) {
         if (isset($this->identityMap[$id])) {
             $mapped[] = $this->identityMap[$id];
         } else {
             $remain[] = $id;
         }
     }
     if ($remain) {
         $list = $this->addObjectListToMap(Cache::worker($this)->getListByIds($remain, $expires));
         $mapped = array_merge($mapped, $list);
     }
     return ArrayUtils::regularizeList($ids, $mapped);
 }