=== modified file 'sites/all/modules/contrib/memcache/memcache.inc'
--- memcache.inc	2010-07-12 21:04:42 +0000
+++ memcache.inc	2010-08-16 23:00:49 +0000
@@ -57,6 +57,8 @@ class MemCacheDrupal implements DrupalCa
     }
     // Check if the item being fetched matches any prefixes.
     foreach ($memcached_prefixes[$this->bin] as $prefix) {
+      // The prefix will not match unless converted to a full key.
+      $prefix = dmemcache_key($prefix, $this->bin);
       if (substr($cid, 0, strlen($prefix)) == $prefix) {
         // On a match, check if we already know the current counter value.
         if (!isset($memcached_counters[$this->bin][$prefix])) {
@@ -154,7 +156,7 @@ class MemCacheDrupal implements DrupalCa
   function clear($cid = NULL, $wildcard = FALSE) {
     global $memcached_prefixes, $memcached_counters;
 
-    if (empty($cid) || $wildcard === TRUE) {
+    if (empty($cid)) {
       if (variable_get('cache_lifetime', 0)) {
         // Update the timestamp of the last global flushing of this bin.  When
         // retrieving data from this bin, we will compare the cache creation

