You are here

function ctools_object_cache_clear in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/object-cache.inc \ctools_object_cache_clear()

Remove an object from the non-volatile ctools 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 object being removed.

6 calls to ctools_object_cache_clear()
ctools_ajax_sample_cache_clear in ctools_ajax_sample/ctools_ajax_sample.module
Clear the wizard cache.
ctools_export_ui::edit_cache_clear in plugins/export_ui/ctools_export_ui.class.php
Clear the object cache for the currently edited item.
ctools_object_cache_set in includes/object-cache.inc
Store an object in the non-volatile ctools cache.
ctools_stylizer_clear_settings_cache in includes/stylizer.inc
Remove an item from the object cache.
page_manager_clear_page_cache in page_manager/page_manager.module
Remove an item from the object cache.

... See full list

File

includes/object-cache.inc, line 77
The non-volatile object cache is used to store an object while it is being edited, so that we don't have to save until we're completely done. The cache should be 'cleaned' on a regular basis, meaning to remove old objects from the…

Code

function ctools_object_cache_clear($obj, $name) {
  db_query("DELETE FROM {ctools_object_cache} WHERE sid = '%s' AND obj = '%s' AND name = '%s'", session_id(), $obj, $name);

  // Ensure the static cache is emptied of this obj:name set.
  $cache =& ctools_static('ctools_object_cache_get', array());
  unset($cache["{$obj}:{$name}"]);
}