You are here

function esi_panels_esi_cache_get_cache in ESI: Edge Side Includes 7.3

Get cached content.

1 string reference to 'esi_panels_esi_cache_get_cache'
esi.inc in modules/esi_panels/plugins/cache/esi.inc
ESI cache plugin. Substitutes esi-tags for a panel-pane's content.

File

modules/esi_panels/plugins/cache/esi.inc, line 36
ESI cache plugin. Substitutes esi-tags for a panel-pane's content.

Code

function esi_panels_esi_cache_get_cache($conf, $display, $args, $contexts, $pane = NULL) {

  // If this 'cache get' function returns FALSE, panels will invoke and render
  // the pane in the normal way.
  return FALSE;

  // @TODO: is this necessary now?
  // // Check that the pane is indeed meant to be served by ESI.
  // if (empty($pane) || empty($pane->cache['method']) || $pane->cache['method'] != 'esi') {
  //   return FALSE;
  // }
  //
  // // Panels expects a cache-handler to return an object similar to the object
  // // returned by cache_get().  Faking a cached object allows us to return a
  // // simple ESI tag instead.
  //
  // // Fake the cached object.
  // $cache = new stdClass;
  // $cache->data = new panels_cache_object();
  // $cache->data->content = new stdClass;
  // $cache->data->head = NULL;
  // $cache->data->css = array();
  // $cache->data->js = array();
  // $cache->data->tokens = array();
  // $cache->data->ready = TRUE;
  //
  // // Fill in the content with the ESI code
  // $cache->data->content->content = 'This is my content, tell me yours.';
  //
  // // Add in extras if missing.
  // if (!isset($cache->data->content->module)) {
  //   $cache->data->content->module = isset($pane->type) ? $pane->type : 'esi_panels';
  // }
  // if (!isset($cache->data->content->delta)) {
  //   $cache->data->content->delta = isset($pane->subtype) ? $pane->subtype : 'esi';
  // }
  //
  // // Return the cache object.
  // return $cache->data;
}