function MemcachedStore::getValueAndCas
2 calls to MemcachedStore::getValueAndCas()
- MemcachedStore::delete in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Removes a resource from the storage.
- MemcachedStore::putOffExpiration in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Extends the TTL of a resource.
File
-
vendor/
symfony/ lock/ Store/ MemcachedStore.php, line 136
Class
- MemcachedStore
- MemcachedStore is a PersistingStoreInterface implementation using Memcached as store engine.
Namespace
Symfony\Component\Lock\StoreCode
private function getValueAndCas(Key $key) : array {
if ($this->useExtendedReturn ??= version_compare(phpversion('memcached'), '2.9.9', '>')) {
$extendedReturn = $this->memcached
->get((string) $key, null, \Memcached::GET_EXTENDED);
if (\Memcached::GET_ERROR_RETURN_VALUE === $extendedReturn) {
return [
$extendedReturn,
0.0,
];
}
return [
$extendedReturn['value'],
$extendedReturn['cas'],
];
}
$cas = 0.0;
$value = $this->memcached
->get((string) $key, null, $cas);
return [
$value,
$cas,
];
}