You are here

public function CacheObjectAPIWrapper::get in Cache Object API 7

Returns data from the persistent cache.

Data may be stored as either plain text or as serialized data. cache_get() will automatically return unserialized objects and arrays.

Parameters

$cid: The cache ID of the data to retrieve.

Return value

The cache or FALSE on failure.

Overrides DrupalCacheInterface::get

File

./cacheobject.inc, line 48
Provides Cache Object API wrapper class.

Class

CacheObjectAPIWrapper
Provides a cache class exposing hooks operating on objects before they are stored to and after they were received from the cache.

Code

public function get($cid) {
  $result = $this->delegate
    ->get($cid);
  $deliver = module_invoke_all('cacheobject_load', array(
    $result,
  ), array(
    $cid,
  ), $this->bin);
  if (!$this
    ->checkResult($deliver)) {
    return NULL;
  }
  return $result;
}