function MemcachedStore::getUniqueToken
4 calls to MemcachedStore::getUniqueToken()
- MemcachedStore::delete in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Removes a resource from the storage.
- MemcachedStore::exists in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Returns whether or not the resource exists in the storage.
- MemcachedStore::putOffExpiration in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Extends the TTL of a resource.
- MemcachedStore::save in vendor/
symfony/ lock/ Store/ MemcachedStore.php - Stores the resource if it's not locked by someone else.
File
-
vendor/
symfony/ lock/ Store/ MemcachedStore.php, line 126
Class
- MemcachedStore
- MemcachedStore is a PersistingStoreInterface implementation using Memcached as store engine.
Namespace
Symfony\Component\Lock\StoreCode
private function getUniqueToken(Key $key) : string {
if (!$key->hasState(__CLASS__)) {
$token = base64_encode(random_bytes(32));
$key->setState(__CLASS__, $token);
}
return $key->getState(__CLASS__);
}