function RedisStore::getUniqueToken
5 calls to RedisStore::getUniqueToken()
- RedisStore::delete in vendor/
symfony/ lock/ Store/ RedisStore.php - Removes a resource from the storage.
- RedisStore::exists in vendor/
symfony/ lock/ Store/ RedisStore.php - Returns whether or not the resource exists in the storage.
- RedisStore::putOffExpiration in vendor/
symfony/ lock/ Store/ RedisStore.php - Extends the TTL of a resource.
- RedisStore::save in vendor/
symfony/ lock/ Store/ RedisStore.php - Stores the resource if it's not locked by someone else.
- RedisStore::saveRead in vendor/
symfony/ lock/ Store/ RedisStore.php - Stores the resource if it's not locked for reading by someone else.
File
-
vendor/
symfony/ lock/ Store/ RedisStore.php, line 309
Class
- RedisStore
- RedisStore is a PersistingStoreInterface implementation using Redis 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__);
}