You are here

protected function ApcuRawBackend::prepareItem in Supercache 8

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

Prepares a cached item.

Checks that the item is either permanent or did not expire.

Parameters

string $cid: The cache id.

mixed $data: An item retrieved from the cache.

Return value

\stdClass The cache item as a Drupal cache object.

2 calls to ApcuRawBackend::prepareItem()
ApcuRawBackend::get in src/Cache/ApcuRawBackend.php
Returns data from the persistent cache.
ApcuRawBackend::getMultiple in src/Cache/ApcuRawBackend.php
Returns data from the persistent cache when given an array of cache IDs.

File

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

Class

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

Namespace

Drupal\supercache\Cache

Code

protected function prepareItem($cid, $data) {
  return (object) array(
    'data' => $data,
    'cid' => $cid,
  );
}