You are here

function rules_forms_get_cache in Rules Forms Support 7.2

Returns cached data.

Parameters

string $cid: The cache ID of the cache to return.

2 calls to rules_forms_get_cache()
rules_forms_get_element_info in ./rules_forms.module
Returns element info defined in hook_rules_forms_element_info().
rules_forms_get_form_info in ./rules_forms.module
Returns an array of information about active forms.
2 string references to 'rules_forms_get_cache'
rules_forms_clear_cache in ./rules_forms.module
Clears the Rules Forms and Rules caches.
rules_forms_set_cache in ./rules_forms.module
Caches data.

File

./rules_forms.module, line 89
Rules Forms Support provides events, conditions, and actions for site forms.

Code

function &rules_forms_get_cache($cid) {
  static $cache;
  if (!isset($cache)) {
    $cache =& drupal_static(__FUNCTION__, array());
  }
  if (!isset($cache[$cid])) {
    if ($cache_data = cache_get($cid)) {
      $cache[$cid] = $cache_data->data;
    }
    else {
      $cache[$cid] = FALSE;
    }
  }
  return $cache[$cid];
}