You are here

function panels_set_cached_content in Panels 6.3

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

Store cached content for a given display and possibly pane.

5 calls to panels_set_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 68
Contains helper code for plugins and contexts.

Code

function panels_set_cached_content($cache, $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 set');
  if (!$function) {
    return FALSE;
  }
  $conf = $pane ? $pane->cache['settings'] : $display->cache['settings'];

  // snapshot it.
  $cache
    ->cache();
  return $function($conf, $cache, $display, $args, $context, $pane);
}