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