function MemcachedStore::save
Overrides PersistingStoreInterface::save
File
-
vendor/
symfony/ lock/ Store/ MemcachedStore.php, line 52
Class
- MemcachedStore
- MemcachedStore is a PersistingStoreInterface implementation using Memcached as store engine.
Namespace
Symfony\Component\Lock\StoreCode
public function save(Key $key) : void {
$token = $this->getUniqueToken($key);
$key->reduceLifetime($this->initialTtl);
if (!$this->memcached
->add((string) $key, $token, (int) ceil($this->initialTtl))) {
// the lock is already acquired. It could be us. Let's try to put off.
$this->putOffExpiration($key, $this->initialTtl);
}
$this->checkNotExpired($key);
}