--- memcache.inc.old	2007-04-05 22:46:30.000000000 +1000
+++ memcache.inc	2007-04-06 19:29:05.000000000 +1000
@@ -1,6 +1,9 @@
 <?php
 // $ID$
 
+global $memcache_statistics;
+$memcache_statistics = array('get' => 0, 'hit' => 0, 'set' => 0);
+
 /*
  * A memcache API for Drupal.
  */
@@ -20,6 +23,8 @@
  * @return bool
  */
 function dmemcache_set($key, $value, $exp = 0, $bin = 'cache') {
+  global $memcache_statistics;
+  $memcache_statistics['set']++;
   if ($mc = dmemcache_object($bin)) {
     $full_key = dmemcache_key($key, $bin);
     if (!$mc->set($full_key, $value, FALSE, $exp)) {
@@ -41,7 +46,10 @@
  * @return The item which was originally saved or FALSE
  */
 function dmemcache_get($key, $bin = 'cache') {
+  global $memcache_statistics;
+  $memcache_statistics['get']++;
   if ($mc = dmemcache_object($bin)) {
+    $memcache_statistics['hit']++;
     $full_key = dmemcache_key($key, $bin);
     return $mc->get($full_key);
   }
