_update_get_cache_multiple

Versions
7
_update_get_cache_multiple($cid_prefix)

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

Return value

Associative array of cache items, keyed by cache ID.

Related topics

▾ 2 functions call _update_get_cache_multiple()

_update_create_fetch_task in modules/update/update.fetch.inc
Add a task to the queue for fetching release history data for a project.
_update_get_cached_available_releases in modules/update/update.module
Return all currently cached data about available releases for all projects.

Code

modules/update/update.module, line 829

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.