function _update_status_cache_set in Update Status 5.2
Store data in the private update status cache table.
Parameters
$cid: The cache ID to save the data with.
$data: The data to store.
$expire: One of the following values:
- CACHE_PERMANENT: Indicates that the item should never be removed except by explicitly using _update_status_cache_clear() or update_status_invalidate_cache().
- A Unix timestamp: Indicates that the item should be kept at least until the given time, after which it will be invalidated.
Related topics
3 calls to _update_status_cache_set()
- update_status_calculate_project_data in ./
update_status.module - Given the installed projects and the available release data retrieved from remote servers, calculate the current status.
- update_status_get_projects in ./
update_status.module - Fetch an array of installed and enabled projects.
- update_status_refresh in ./
update_status.module - Fetch project info via XML from a central server.
File
- ./
update_status.module, line 1858
Code
function _update_status_cache_set($cid, $data, $expire) {
$created = time();
db_query("UPDATE {cache_update_status} SET data = %b, created = %d, expire = %d WHERE cid = '%s'", $data, $created, $expire, $cid);
if (!db_affected_rows()) {
@db_query("INSERT INTO {cache_update_status} (cid, data, created, expire) VALUES ('%s', %b, %d, %d)", $cid, $data, $created, $expire);
}
}