$result =
[];
try { $result =
$this->connection->
query('SELECT [cid], [data], [created], [expire], [serialized], [tags], [checksum] FROM {' .
$this->connection->
escapeTable($this->bin
) . '} WHERE [cid] IN ( :cids[] ) ORDER BY [cid]',
[':cids[]' =>
array_keys($cid_mapping)]);
} catch (\Exception
$e) { // Nothing to do.
} $cache =
[];
foreach ($result as $item) { // Map the cache ID back to the original.
$item->cid =
$cid_mapping[$item->cid
];
$item =
$this->
prepareItem($item,
$allow_invalid);
if ($item) { $cache[$item->cid
] =
$item;
} } $cids =
array_diff($cids,
array_keys($cache));
return $cache;
} /**
* Prepares a cached item.
*
* Checks that items are either permanent or did not expire, and unserializes
* data as appropriate.
*
* @param object $cache
* An item loaded from self::get() or self::getMultiple().
* @param bool $allow_invalid
* If FALSE, the method returns FALSE if the cache item is not valid.
*
* @return mixed|false
* The item with data unserialized as appropriate and a property indicating
* whether the item is valid, or FALSE if there is no valid item to load.
*/