function DrupalFileCache::getMultiple in File Cache 7
Return data from the persistent cache when given an array of cache IDs.
Parameters
$cids: An array of cache IDs for the data to retrieve. This is passed by reference, and will have the IDs successfully returned from cache removed.
Return value
An array of the items successfully returned from cache indexed by cid.
Overrides DrupalCacheInterface::getMultiple
File
- ./
filecache.inc, line 290 - DrupalFileCache class that implements DrupalCacheInterface.
Class
Code
function getMultiple(&$cids) {
$results = array();
foreach ($cids as $cid) {
$cache = $this
->get($cid);
if ($cache !== FALSE) {
$results[$cid] = $cache;
}
}
foreach (array_keys($results) as $cid) {
if (($key = array_search($cid, $cids)) !== false) {
unset($cids[$key]);
}
}
return $results;
}