Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MemcachedStore.php

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\Store

Code

private function getUniqueToken(Key $key) : string {
    if (!$key->hasState(__CLASS__)) {
        $token = base64_encode(random_bytes(32));
        $key->setState(__CLASS__, $token);
    }
    return $key->getState(__CLASS__);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal