WP_Object_Cache::_exists( int|string $key, string $group )

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

Parameters Parameters


(int|string) (Required) Cache key to check for existence.


(string) (Required) Cache group for the key existence check.

Top ↑

Return Return

(bool) Whether the key exists in the cache for the given group.

Top ↑

Source Source

File: wp-includes/class-wp-object-cache.php

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

Top ↑

Changelog Changelog

Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.