You are here

function panels_content_cache_get_cache in Panels Content Cache 6

Same name and namespace in other branches
  1. 7 plugins/cache/content.inc \panels_content_cache_get_cache()

Get cached content.

1 string reference to 'panels_content_cache_get_cache'
content.inc in plugins/cache/content.inc
Provides a content-based caching option for panel panes.

File

plugins/cache/content.inc, line 28
Provides a content-based caching option for panel panes.

Code

function panels_content_cache_get_cache($conf, $display, $args, $contexts, $pane = NULL) {
  $cid = panels_content_cache_get_id($conf, $display, $args, $contexts, $pane);
  $cache = cache_get($cid, 'cache');
  if (!$cache) {
    return FALSE;
  }
  if ($conf['lifetime'] != 'none' && time() - $cache->created > $conf['lifetime']) {
    return FALSE;
  }
  return $cache->data;
}