You are here

function ctools_object_cache_clear_all in Chaos Tool Suite (ctools) 6

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

Remove an object from the non-volatile ctools cache for all session IDs.

This is useful for clearing a lock.

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.

1 call to ctools_object_cache_clear_all()
page_manager_break_lock_submit in page_manager/page_manager.admin.inc
Submit to break the lock on a page.

File

includes/object-cache.inc, line 143
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_all($obj, $name) {
  db_query("DELETE FROM {ctools_object_cache} WHERE obj = '%s' AND name = '%s'", $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}"]);
}