You are here

function cache_get in APC - Alternative PHP Cache 6

Same name and namespace in other branches
  1. 5 apc.inc \cache_get()

Return data from the persistent cache.

Parameters

$key: The key of the data to retrieve.

$bin: The bin/silo to look in. Valid core values are 'cache_filter', 'cache_menu', 'cache_page', or 'cache' for the default cache.

File

./apc.inc, line 22

Code

function cache_get($cid, $bin = 'cache') {
  $cache = apc_handle_get($cid, $bin);
  if (is_object($cache) && $cache->serialized) {
    $cache->data = unserialize($cache->data);
  }
  return $cache;
}