WP_AI_Client_Cache::get
Fetches a value from the cache.
Метод класса: WP_AI_Client_Cache{}
Хуков нет.
Возвращает
mixed. The value of the item from the cache, or $default_value in case of cache miss.
Использование
$WP_AI_Client_Cache = new WP_AI_Client_Cache(); $WP_AI_Client_Cache->get( $key, $default_value );
- $key(строка) (обязательный)
- The unique key of this item in the cache.
- $default_value(разное)
- Default value to return if the key does not exist.
По умолчанию:null
Список изменений
| С версии 7.0.0 | Введена. |
Код WP_AI_Client_Cache::get() WP AI Client Cache::get WP 7.1.2
public function get( $key, $default_value = null ) {
$found = false;
$value = wp_cache_get( $key, $this->get_cache_group(), false, $found );
if ( ! $found ) {
return $default_value;
}
return $value;
}