Index: memcache.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/memcache/memcache.inc,v
retrieving revision 1.15.2.8.2.24
diff -u -p -r1.15.2.8.2.24 memcache.inc
--- memcache.inc	4 Dec 2010 13:45:11 -0000	1.15.2.8.2.24
+++ memcache.inc	8 Dec 2010 03:45:29 -0000
@@ -167,7 +167,14 @@ function cache_clear_all($cid = NULL, $t
     return;
   }
   if (empty($cid) || $wildcard === TRUE) {
-    if ($cid == '*') {
+    // system_cron() flushes all cache bins returned by hook_flush_caches()
+    // with cache_clear_all(NULL, $bin); This is for garbage collection with
+    // the database cache, but serves no purpose with memcache. So return
+    // early here.
+    if (!isset($cid)) {
+      return;
+    }
+    elseif ($cid == '*') {
       $cid = '';
     }
     if (variable_get('cache_lifetime', 0) && empty($cid)) {
