You are here

function panels_get_cached_content in Panels 6.2

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

Get cached content for a given display and possibly pane.

Return value

The cached content, or FALSE to indicate no cached content exists.

Related topics

2 calls to panels_get_cached_content()
panels_get_pane_content in includes/plugins.inc
Get the content from a given pane.
panels_render_layout in includes/display-render.inc
Given a full layout structure and a content array, render a panel display. @render

File

includes/plugins.inc, line 564
plugins.inc

Code

function panels_get_cached_content($display, $args, $context, $pane = NULL) {
  $method = $pane ? $pane->cache['method'] : $display->cache['method'];
  $function = panels_plugin_get_function('cache', $method, 'cache get');
  if (!$function) {
    return FALSE;
  }
  $conf = $pane ? $pane->cache['settings'] : $display->cache['settings'];
  $cache = $function($conf, $display, $args, $context, $pane);
  if (empty($cache)) {
    return FALSE;
  }

  // restore it.
  $cache
    ->restore();
  return $cache;
}