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

Breadcrumb

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

function MemcachedStore::getValueAndCas

2 calls to MemcachedStore::getValueAndCas()
MemcachedStore::delete in vendor/symfony/lock/Store/MemcachedStore.php
Removes a resource from the storage.
MemcachedStore::putOffExpiration in vendor/symfony/lock/Store/MemcachedStore.php
Extends the TTL of a resource.

File

vendor/symfony/lock/Store/MemcachedStore.php, line 136

Class

MemcachedStore
MemcachedStore is a PersistingStoreInterface implementation using Memcached as store engine.

Namespace

Symfony\Component\Lock\Store

Code

private function getValueAndCas(Key $key) : array {
    if ($this->useExtendedReturn ??= version_compare(phpversion('memcached'), '2.9.9', '>')) {
        $extendedReturn = $this->memcached
            ->get((string) $key, null, \Memcached::GET_EXTENDED);
        if (\Memcached::GET_ERROR_RETURN_VALUE === $extendedReturn) {
            return [
                $extendedReturn,
                0.0,
            ];
        }
        return [
            $extendedReturn['value'],
            $extendedReturn['cas'],
        ];
    }
    $cas = 0.0;
    $value = $this->memcached
        ->get((string) $key, null, $cas);
    return [
        $value,
        $cas,
    ];
}

API Navigation

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