public function get(string $primary_key, $sub_key)
    {
        if (!$this->enabled) {
            return; // Not possible.
            //
        } elseif (!($key = $this->key($primary_key, $sub_key))) {
            return; // Fail; e.g., race condition.
        }
        $value = $this->Pool->get($key); // Possibly `false`.
        // See: <http://php.net/manual/en/memcached.get.php#92275>

        if ($this->Pool->getResultCode() === \Memcached::RES_SUCCESS) {
            return $value; // Return the value.
        }
    }
public function get(string $primary_key, $sub_key)
    {
        if (!$this->enabled) {
            return; // Not possible.
            //
        } elseif (!($key = $this->key($primary_key, $sub_key))) {
            return; // Fail; e.g., race condition.
        }
        $value = $this->Pool->get($key); // Possibly `false`.
        // See: <http://php.net/manual/en/memcached.get.php#92275>

        if ($this->Pool->getResultCode() === \Memcached::RES_SUCCESS) {
            return $value; // Return the value.
        }
    }
public function get ( string $ primary_key , $ sub_key ) { if ( ! $ this -> enabled ) { return ; // Not possible. // } elseif ( ! ( $ key = $ this -> key ( $ primary_key , $ sub_key ) ) ) { return ; // Fail; e.g., race condition. } $ value = $ this -> Pool -> get ( $ key ) ; // Possibly `false`. // See: <http://php.net/manual/en/memcached.get.php#92275> if ( $ this -> Pool -> getResultCode ( ) === \ Memcached :: RES_SUCCESS ) { return $ value ; // Return the value. } }
Get cache value by key.

@since 151216 Memcache utils.

@param string     $primary_key Primary key.
@param string|int $sub_key     Sub-key to get.

@return mixed|null Null if missing, or on failure.
Get cache value by key .