function ctools_object_cache_test_objects

Get the cache status of a group of objects.

This is useful for displaying lock status when listing a number of objects an an administration UI.

Parameters

$obj: A 128 character or less string to define what kind of object is being stored; primarily this is used to prevent collisions.

$names: An array of names of objects

Return value

An array of objects containing the UID and updated date for each name found.

1 call to ctools_object_cache_test_objects()
page_manager_list_page in page_manager/page_manager.admin.inc
Output a list of pages that are managed.

File

includes/object-cache.inc, line 168

Code

function ctools_object_cache_test_objects($obj, $names) {
    array_walk($names, 'md5');
    return db_query("SELECT c.name, s.uid, c.updated FROM {ctools_object_cache} c INNER JOIN {sessions} s ON c.sid = s.sid WHERE c.obj = :obj AND c.name IN (:names) ORDER BY c.updated ASC", array(
        ':obj' => $obj,
        ':names' => $names,
    ))->fetchAllAssoc('name');
}