You are here

function panels_simple_cache_get_cache in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_simple_cache/panels_simple_cache.module \panels_simple_cache_get_cache()
  2. 6.3 plugins/cache/simple.inc \panels_simple_cache_get_cache()
  3. 7.3 plugins/cache/simple.inc \panels_simple_cache_get_cache()

Get cached content.

1 string reference to 'panels_simple_cache_get_cache'
panels_simple_cache_panels_cache in panels_simple_cache/panels_simple_cache.module
Implementation of hook_panels_cache()

File

panels_simple_cache/panels_simple_cache.module, line 62
panels_simple_cache.module

Code

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