You are here

private function MemcacheBackend::combineItems in Memcache API and Integration 8.2

Given an array of child cache items, recombine into a single value.

Parameters

\stdClass[] $items: An array of child cache items.

Return value

mixed The combined an unserialized value that was originally stored.

1 call to MemcacheBackend::combineItems()
MemcacheBackend::getMultiple in src/MemcacheBackend.php
Returns data from the persistent cache when given an array of cache IDs.

File

src/MemcacheBackend.php, line 290

Class

MemcacheBackend
Defines a Memcache cache backend.

Namespace

Drupal\memcache

Code

private function combineItems(array $items) {
  $data = array_reduce($items, function ($collected, $item) {
    return $collected . $item->data;
  }, '');
  return unserialize($data);
}