WP_Object_Cache::_exists() protected WP 3.4.0
Serves as a utility function to determine whether a key exists in the cache.
{} Это метод класса: WP_Object_Cache{}
Хуков нет.
Возвращает
true|false
. Whether the key exists in the cache for the given group.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->_exists( $key, $group );
- $key(число/строка) (обязательный)
- Cache key to check for existence.
- $group(строка) (обязательный)
- Cache group for the key existence check.
Список изменений
С версии 3.4.0 | Введена. |
Код WP_Object_Cache::_exists() WP Object Cache:: exists WP 5.7.1
protected function _exists( $key, $group ) {
return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) );
}