You are here

function panels_clear_cached_content in Panels 6.3

Same name and namespace in other branches
  1. 5.2 includes/plugins.inc \panels_clear_cached_content()
  2. 6.2 includes/plugins.inc \panels_clear_cached_content()
  3. 7.3 includes/plugins.inc \panels_clear_cached_content()

Clear all cached content for a display.

1 call to panels_clear_cached_content()
panels_save_display in ./panels.module
Save a display object.

File

includes/plugins.inc, line 91
Contains helper code for plugins and contexts.

Code

function panels_clear_cached_content($display) {

  // Figure out every method we might be using to cache content in this display:
  $methods = array();
  if (!empty($display->cache['method'])) {
    $methods[$display->cache['method']] = TRUE;
  }
  foreach ($display->content as $pane) {
    if (!empty($pane->cache['method'])) {
      $methods[$pane->cache['method']] = TRUE;
    }
  }
  foreach (array_keys($methods) as $method) {
    $function = panels_plugin_get_function('cache', $method, 'cache clear');
    if ($function) {
      $function($display);
    }
  }
}