protected function ApcuRawBackend::apcSet in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::apcSet()
Store a value using apcu_store and adjusting the $expire timestamp to a TTL.
Parameters
string $cid: The cache id.
mixed $data: An item to store in the cache.
int $expire: The unix timestamp at which this item will expire.
2 calls to ApcuRawBackend::apcSet()
- ApcuRawBackend::counter in src/
Cache/ ApcuRawBackend.php - Add an increment (can be negative) to the stored cache data. Only works for stored numeric data.
- ApcuRawBackend::set in src/
Cache/ ApcuRawBackend.php - Stores data in the persistent cache.
File
- src/
Cache/ ApcuRawBackend.php, line 47 - Contains \Drupal\supercache\Cache\ApcuRawBackend.
Class
- ApcuRawBackend
- Stores cache items in the Alternative PHP Cache User Cache (APCu).
Namespace
Drupal\supercache\CacheCode
protected function apcSet($cid, $data, $expire) {
if ($ttl = $this
->getTtl($expire)) {
return apcu_store($cid, $data, $ttl);
}
else {
return apcu_store($cid, $data);
}
}