You are here

function panels_simple_cache_clear_cache in Panels 7.3

Same name and namespace in other branches
  1. 5.2 panels_simple_cache/panels_simple_cache.module \panels_simple_cache_clear_cache()
  2. 6.3 plugins/cache/simple.inc \panels_simple_cache_clear_cache()
  3. 6.2 panels_simple_cache/panels_simple_cache.module \panels_simple_cache_clear_cache()

Clear cached content.

Cache clears are always for an entire display, regardless of arguments.

1 string reference to 'panels_simple_cache_clear_cache'
simple.inc in plugins/cache/simple.inc
Provides a simple time-based caching option for panel panes.

File

plugins/cache/simple.inc, line 53
Provides a simple time-based caching option for panel panes.

Code

function panels_simple_cache_clear_cache($display) {
  $cid = 'panels_simple_cache';

  // If the panel is stored in the database it'll have a numeric did value.
  if (is_numeric($display->did)) {
    $cid .= ':' . $display->did;
  }
  elseif (!empty($display->cache_key)) {
    $cid .= ':' . str_replace('panel_context:', '', $display->cache_key);
  }
  elseif (!empty($display->css_id)) {
    $cid .= ':' . $display->css_id;
  }
  else {
    $cid .= ':' . $display->did;
  }
  cache_clear_all($cid, 'cache_panels', TRUE);
}