/**
* {@inheritdoc}
*/
public function set($cid,
$data,
$expire = CacheBackendInterface::CACHE_PERMANENT, array
$tags =
[]) { assert(Inspector::
assertAllStrings($tags), 'Cache tags must be strings.'
);
$tags =
array_unique($tags);
$cache =
new \
stdClass();
$cache->cid =
$cid;
$cache->created =
round(microtime(TRUE
), 3
);
$cache->expire =
$expire;
$cache->tags =
implode(' ',
$tags);
$cache->checksum =
$this->checksumProvider->
getCurrentChecksum($tags);
// APCu serializes/unserializes any structure itself.
$cache->serialized = 0;
$cache->data =
$data;
// Expiration is handled by our own prepareItem(), not APCu.
apcu_store($this->
getApcuKey($cid),
$cache);
} /**
* {@inheritdoc}
*/