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

Breadcrumb

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

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

Code

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);
}

API Navigation

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