function _update_get_cache_multiple

Returns an array of cache items with a given cache ID prefix.

Parameters

string $cid_prefix: The cache ID prefix.

Return value

Associative array of cache items, keyed by cache ID.

Related topics

2 calls to _update_get_cache_multiple()
_update_create_fetch_task in modules/update/update.fetch.inc
Adds a task to the queue for fetching release history data for a project.
_update_get_cached_available_releases in modules/update/update.module
Returns all currently cached data about available releases for all projects.

File

modules/update/update.module, line 822

Code

function _update_get_cache_multiple($cid_prefix) {
  $data = array();
  $result = db_select('cache_update')->fields('cache_update', array(
    'cid',
    'data',
    'created',
    'expire',
    'serialized',
  ))
    ->condition('cache_update.cid', $cid_prefix . '::%', 'LIKE')
    ->execute();
  foreach ($result as $cache) {
    if ($cache) {
      if ($cache->serialized) {
        $cache->data = unserialize($cache->data);
      }
      $data[$cache->cid] = $cache;
    }
  }
  return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.