WordPress Cache Inspect

What it does

The aim of the plugin is to help people analyse the behaviour of the cache builtin to WordPress v2.0. It provides the administrator with a quick overview of how the cache is performming and allows the cache to be cleared manually from an admin page.

How it works

The plugin displays a small semi-transparent box in the top right hand corner of the page for all logged in users with the manage_cache capability. By default this capability is given to the Administrator user at plugin activation and removed from the Administrator user at plugin deactivation. Any user with the capabilty will also be able to clear the cache using the Manage … Cache page which appears in the administation interface.

Cold Cache Hits
This is the number of cached items that were loaded from disk.
Warm Cache Hits
This is the number of cached items accessed that were already in memory
Cache Misses
This is the number of items that had to be fetched from the db as they were not in the cache.
Loaded data
This lists the type and amount of data loaded into memory from that currently stored within the cache..

Known Issues

The plugin hooks into the builtin cache object and relys on accessing some of its private data to extract the statistics as such it is not compatible with any of the available cache alternatives.

Requirements

This plugin requires WordPress 2.0 or later to function as it relies on the existance of the cache and the ability to detect plugin activation/deactivation to register the new manage_cache role.

Download

The latest version of the plugin may be downloaded here: pjw-wp-cache-inspect.0.50.zip

66 thoughts on “WordPress Cache Inspect

  1. ovidiu

    hello,

    I do never ever see anything in the cache – could it be that the cache is disabled??? or what else could be the problem?

  2. Ovidiu: Yes if you don’t see anything it is likely that the cache is disabled – It was disabled by default in versions of WordPress from 2.0.2 I believe and it was becoming a problem to support on all server platforms so yuo have to enable it manually by adding a define (“define('ENABLE_CACHE', true);“) to wp-config.php before it will work.

  3. Pingback: WordPress Plugin: Cache Inspect at JohnTP’s Home

  4. Pingback: WordPress Plugins at JohnTP’s Home

  5. Ovidiu: This plugin won’t provide any information about the content caching provided by wp-cache2. It only provides information about the builtin caching in WordPress which cache data queried from the database.

  6. Hi,

    Westi, I just graded my blog from WP 1.5.3 beta 1 to WP 2.0.4 and the cache is empty. So I added the line to my wp-config file and refreshed a few pages and still there is nothing displayed on the cache tab. 🙁

    When I was running WP 1.5.3 beta 1 I was using wp-cache which I have disabled and removed its cache line from wp-config. So there should be no interference or anything.

    Any idea on what the problem could be?

    Thanks a lot,

    Will

  7. Will:If the built-in WordPress cache is still empty after you have enabled it with the define in wp-config.php then it is likely that something else todo with your server config is stopping it writing the files it wants to write in the wp-content/cache folder either file permissions or php setup.

  8. Hi,

    Very strange. Well the cache folder is chmod 777 and there are files in there and I notice if I clear the cache they get deleted and on the next page load they are recreated. So the cache is working, so it seems.

    Even tried it here locally on my winxp box and same results.

    Um, not sure what you mean by php setup. Some “evil” setting?

    Thanks again for your help,

    Will

  9. Um, this is really weird. It works now. lol I changed nothing. Just started to work on its own. he he 🙂

Comments are closed.