WordPress at a glance
function is not described

WP_Object_Cache::stats() public WP 2.0.0

Echoes the stats of the caching.

Gives the cache hits, and cache misses. Also prints every cached group, key and the data.

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

No Hooks.

Return

null. Nothing.

Usage

$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->stats();

Changelog

Since 2.0.0 Introduced.

Code of WP_Object_Cache::stats() WP 5.7.2

<?php
public function stats() {
	echo '<p>';
	echo "<strong>Cache Hits:</strong> {$this->cache_hits}<br />";
	echo "<strong>Cache Misses:</strong> {$this->cache_misses}<br />";
	echo '</p>';
	echo '<ul>';
	foreach ( $this->cache as $group => $cache ) {
		echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
	}
	echo '</ul>';
}