You are here

function panels_get_cached_content in Panels 6.3

Same name and namespace in other branches
  1. 5.2 includes/plugins.inc \panels_get_cached_content()
  2. 6.2 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.

5 calls to panels_get_cached_content()
panels_renderer_legacy::render in plugins/display_renderers/panels_renderer_legacy.class.php
Builds inner content, then hands off to layout-specified theme function for final render step.
panels_renderer_legacy::render_pane in plugins/display_renderers/panels_renderer_legacy.class.php
Render the contents of a single pane.
panels_renderer_standard::render in plugins/display_renderers/panels_renderer_standard.class.php
Build inner content, then hand off to layout-specified theme function for final render step.
panels_renderer_standard::render_pane_content in plugins/display_renderers/panels_renderer_standard.class.php
Render the interior contents of a single pane.
panels_render_layout in ./panels.module
Given a full layout structure and a content array, render a panel display.

File

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

Code

function panels_get_cached_content($display, $args, $context, $pane = NULL) {

  // Never use cache on a POST
  if (!empty($_POST)) {
    return FALSE;
  }
  $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;
}