cache_set($cid, $data, $expire = CACHE_PERMANENT, $headers = NULL)
drupal/includes/bootstrap.inc, line 375
Store data in the persistent cache.
$cid The cache ID of the data to store.
$data The data to store in the cache. Complex data types must be serialized first.
$expire One of the following values:
function cache_set($cid, $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_lock_table('cache');
db_query("UPDATE {cache} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid);
if (!db_affected_rows()) {
@db_query("INSERT INTO {cache} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, $data, time(), $expire, $headers);
}
db_unlock_tables();
}