On this page
function _update_get_cache_multiple
_update_get_cache_multiple($cid_prefix)
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
File
- modules/update/update.module, line 821
- Handles updates of Drupal core and contributed projects.
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.module/function/_update_get_cache_multiple/7.x