function views_object_cache_set

Store an object in the non-volatile Views cache.

Parameters

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

$name: The name of the view (or other object) being stored.

$cache: The object to be cached. This will be serialized prior to writing.

Related topics

1 call to views_object_cache_set()
views_ui_cache_set in ./views_ui.module
Specialized cache function to add a flag to our view, include an appropriate include, and cache more easily.

File

includes/cache.inc, line 258

Code

function views_object_cache_set($obj, $name, $cache) {
    views_object_cache_clear($obj, $name);
    db_query("INSERT INTO {views_object_cache} (sid, obj, name, data, updated) VALUES ('%s', '%s', '%s', '%s', %d)", session_id(), $obj, $name, serialize($cache), time());
}