function DrushFileCache::getMultiple

6.x DrushFileCache::getMultiple(&$cids)
5.x DrushFileCache::getMultiple(&$cids)

Return data from the persistent cache when given an array of cache IDs.


$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 DrushCacheInterface::getMultiple

1 call to DrushFileCache::getMultiple()
DrushFileCache::get in includes/
Return data from the persistent cache.


includes/, line 325
Drush cache API


Default cache implementation.


function getMultiple(&$cids) {
  try {
    $cache = array();
    foreach ($cids as $cid) {
      $filename = $this->getFilePath($cid);
      if (!file_exists($filename)) {
        throw new Exception;

      $item = $this->readFile($filename);
      if ($item) {
        $cache[$cid] = $item;
    $cids = array_diff($cids, array_keys($cache));
    return $cache;
  catch (Exception $e) {
    return array();