]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/cache.php
Wordpress 3.1-scripts
[autoinstalls/wordpress.git] / wp-includes / cache.php
index 6243866288a75e022bd0c83c18871f6fb61250a7..895c43161a0b607bacbe7c15991fb38a29aa7053 100644 (file)
@@ -110,7 +110,7 @@ function wp_cache_init() {
  * @uses $wp_object_cache Object Cache Class
  * @see WP_Object_Cache::replace()
  *
- * @param int|string $id What to call the contents in the cache
+ * @param int|string $key What to call the contents in the cache
  * @param mixed $data The contents to store in the cache
  * @param string $flag Where to group the cache contents
  * @param int $expire When to expire the cache contents
@@ -129,7 +129,7 @@ function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
  * @uses $wp_object_cache Object Cache Class
  * @see WP_Object_Cache::set()
  *
- * @param int|string $id What to call the contents in the cache
+ * @param int|string $key What to call the contents in the cache
  * @param mixed $data The contents to store in the cache
  * @param string $flag Where to group the cache contents
  * @param int $expire When to expire the cache contents
@@ -171,8 +171,6 @@ function wp_cache_add_non_persistent_groups( $groups ) {
  * this function instructs the backend to reset those keys and perform any cleanup since blog or site IDs have changed since cache init.
  *
  * @since 2.6.0
- *
- * @param string|array $groups A group or an array of groups to add
  */
 function wp_cache_reset() {
        global $wp_object_cache;
@@ -451,15 +449,11 @@ class WP_Object_Cache {
                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 "<p>";
-                       echo "<strong>Group:</strong> $group<br />";
-                       echo "<strong>Cache:</strong>";
-                       echo "<pre>";
-                       print_r($cache);
-                       echo "</pre>";
+                       echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';
                }
+               echo '</ul>';
        }
 
        /**