You are here

public function ApcuRawBackend::get in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::get()

Returns data from the persistent cache.

Parameters

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

Return value

object|false The cache item or FALSE on failure.

Overrides CacheRawBackendInterface::get

See also

\Drupal\Core\Cache\CacheRawBackendInterface::getMultiple()

1 call to ApcuRawBackend::get()
ApcuRawBackend::counterGet in src/Cache/ApcuRawBackend.php
Get the value of a counter variable.

File

src/Cache/ApcuRawBackend.php, line 111
Contains \Drupal\supercache\Cache\ApcuRawBackend.

Class

ApcuRawBackend
Stores cache items in the Alternative PHP Cache User Cache (APCu).

Namespace

Drupal\supercache\Cache

Code

public function get($cid) {
  $success = FALSE;
  $data = apcu_fetch($this
    ->getApcuKey($cid), $success);
  if (!$success) {
    return FALSE;
  }
  return $this
    ->prepareItem($cid, $data);
}