WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Object_Cache::get() public WP 2.0.0

Retrieves the cache contents, if it exists.

The contents will be first attempted to be retrieved by searching by the key in the cache group. If the cache is hit (success) then the contents are returned.

On failure, the number of cache misses will be incremented.

Это метод класса: WP_Object_Cache{}

Хуков нет.

Возвращает

Разное/false. The cache contents on success, false on failure to retrieve contents.

Использование

$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->get( $key, $group, $force, $found );
$key(число/строка) (обязательный)
The key under which the cache contents are stored.
$group(строка)
Where the cache contents are grouped.
По умолчанию: 'default'
$force(true/false)
Unused. Whether to force an update of the local cache from the persistent cache.
По умолчанию: false
$found(true/false) (передается по ссылке — &)
Whether the key was found in the cache (passed by reference). Disambiguates a return of false, a storable value.
По умолчанию: null

Список изменений

С версии 2.0.0 Введена.

Код WP_Object_Cache::get() WP 5.5.1

wp-includes/class-wp-object-cache.php
<?php
public function get( $key, $group = 'default', $force = false, &$found = null ) {
	if ( empty( $group ) ) {
		$group = 'default';
	}

	if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) {
		$key = $this->blog_prefix . $key;
	}

	if ( $this->_exists( $key, $group ) ) {
		$found             = true;
		$this->cache_hits += 1;
		if ( is_object( $this->cache[ $group ][ $key ] ) ) {
			return clone $this->cache[ $group ][ $key ];
		} else {
			return $this->cache[ $group ][ $key ];
		}
	}

	$found               = false;
	$this->cache_misses += 1;
	return false;
}