WordPress at a glance
function is not described

WP_Object_Cache::_exists() protected WP 3.4.0

Serves as a utility function to determine whether a key exists in the cache.

{} It's a method of the class: WP_Object_Cache{}

No Hooks.

Return

true|false. Whether the key exists in the cache for the given group.

Usage

// protected - for code of main (parent) or child class
$result = $this->_exists( $key, $group );
$key(int|string) (required)
Cache key to check for existence.
$group(string) (required)
Cache group for the key existence check.

Changelog

Since 3.4.0 Introduced.

Code of WP_Object_Cache::_exists() WP 5.7.2

<?php
protected function _exists( $key, $group ) {
	return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) );
}