Get key value

@param  string $key
@param  string $searchKey
@return mixed
517191
protected function fetchValue($key, $searchKey = null)
    {
        $object = $this->cache->get($key);

        if (is_null($object)) {
            return null;
        }

        return $searchKey ? array_get($object, $searchKey, null) : $object;
    }
877411
protected function get_index_from_key($key) {
        if (isset(self::$lockidcache[$key])) {
            return self::$lockidcache[$key];
        }

        $index = 0;
        $record = $this->db->get_record('lock_db', array('resourcekey' => $key));
        if ($record) {
            $index = $record->id;
        }

        if (!$index) {
            $record = new \stdClass();
            $record->resourcekey = $key;
            try {
                $index = $this->db->insert_record('lock_db', $record);
            } catch (\dml_exception $de) {
                // Race condition - never mind - now the value is guaranteed to exist.
                $record = $this->db->get_record('lock_db', array('resourcekey' => $key));
                if ($record) {
                    $index = $record->id;
                }
            }
        }

        if (!$index) {
            throw new \moodle_exception('Could not generate unique index for key');
        }

        self::$lockidcache[$key] = $index;
        return $index;
    }
294321
public function get($key)
    {
        if (isset($this->_values[$key])) {
            return $this->_values[$key];
        }

        return null;
    }
75218
public function get($key) {
        $key = $this->conf['keyPrefix'] . $key;
        $s = $this->cache->get($key);
        if ($s === false) {
            X::logger()->trace("MCache miss $key");
            return false;
        }

        X::logger()->trace("MCache hit $key");
        /** @noinspection UnserializeExploitsInspection */
        return is_numeric($s) ? $s : unserialize($s);
    }
1280790
public function getValueStored($key)
    {
        if (isset($this->storedValues[$key])) {
            return $this->storedValues[$key];
        } else {
            return null;
        }
    }
976471
public function get($key)
	{
		$value = wincache_ucache_get($this->prefix.$key);

		if ($value !== false)
		{
			return $value;
		}
	}
115955
public function get(string $key): string
    {
        return $this->handle->hGet($this->name, $key);
    }
104701
public function getKey($key)
    {
        $key = strtolower($key);
        if (!isset($this->keys[$key])) {
            return null;
        }
        return (string)$this->keys[$key];
    }
261532
public function get($key) {
        if (!isset($this->cache[$key]) OR $this->cache[$key]['ttl'] <= $this->getNow()) {
            return null;
        }
        return $this->cache[$key]['value'];
    }
576336
public function get($key)
	{
		$value = xcache_get($this->id($key));

		if (isset($value))
		{
			return $value;
		}
	}
738250
public function get(string $key)
    {
        return isset($this->_configValues[$key])
            ? $this->_configValues[$key]
            : null;
    }
521752
public function get(CacheKey $key) {

		if (!empty($this->elements[$key->getModule()] [$key->getProperty()])) {
            /** @noinspection PhpUndefinedMethodInspection */
            $tValue = $this->elements[$key->getModule()] [$key->getProperty()]->getValue ();
			return $tValue;
		} else {
			return false;
		}
	}
1242845
public function has($searchKey)
    {
        $default = microtime(true);

        if($default == array_get($this->settings, $searchKey, $default) and !is_null($this->fallback))
        {
            return $this->fallback->fallbackHas($searchKey);
        }
        return $default !== array_get($this->settings, $searchKey, $default);
    }
1289834
public function grabValueFromMemcached($key)
    {
        $value = $this->memcache->get($key);
        $this->debugSection("Value", $value);

        return $value;
    }
431189
public function get($key)
    {
        $result = $this->command('get', [$key]);

        return $result !== false ? $result : null;
    }
356350
public function getValue($key)
    {
        return isset($this->langstrings[$key]) ? $this->langstrings[$key] : null;
    }
1094735
public function getValue( $key )
	{
		if( !isset( $this->_values[ $key ] ) ) {
			return null;
		}

		return $this->_values[ $key ];
	}