Make WordPress Core

Ticket #19690: test2.php

File test2.php, 591 bytes (added by leewillis77, 15 years ago)

Revised reproduction details

Line 
1<?php
2
3function debugging() {
4 global $wp_object_cache;
5
6 $tmp = wp_suspend_cache_addition(true);
7
8 error_log( "--------------" );
9 foreach ($wp_object_cache->cache as $group => $cache) {
10 error_log("$group - ". count($cache) ." items");
11 }
12 error_log( "--------------" );
13
14 $discarded = get_posts ('post_type=post&numberposts=50');
15
16 error_log( "--------------" );
17 foreach ($wp_object_cache->cache as $group => $cache) {
18 error_log("$group - ". count($cache) ." items");
19 }
20 error_log( "--------------" );
21
22 wp_suspend_cache_addition($tmp);
23
24}
25
26add_action ( 'init', 'debugging' );
27
28?>