Fetches a value from the cache.
Parameters
$keystringrequired- The unique key of this item in the cache.
$default_valuemixedoptional- Default value to return if the key does not exist.
Default:
null
Source
public function get( $key, $default_value = null ) {
$found = false;
$value = wp_cache_get( $key, self::CACHE_GROUP, false, $found );
if ( ! $found ) {
return $default_value;
}
return $value;
}
Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.