Index: dmemcache.inc
===================================================================
--- dmemcache.inc	(Revision 2531)
+++ dmemcache.inc	(Arbeitskopie)
@@ -71,7 +71,8 @@
       // can be adjusted by setting the memcache_stampede_semaphore variable.
       // TODO: Can we log when a sempahore expires versus being intentionally
       // freed to track when this is happening?
-      if (isset($result->expire) && $result->expire <= $_SERVER['REQUEST_TIME'] && $mc->add($full_key .'_semaphore', '', FALSE, variable_get('memcache_stampede_semaphore', 15))) {
+      $is_expired = !isset($result->expire) || ($result->expire != 0 && $result->expire <= $_SERVER['REQUEST_TIME']);
+      if ($is_expired && $mc->add($full_key .'_semaphore', '', FALSE, variable_get('memcache_stampede_semaphore', 15))) {
         $result = FALSE;
       }
       else {
Index: memcache.db.inc
===================================================================
--- memcache.db.inc	(Revision 2531)
+++ memcache.db.inc	(Arbeitskopie)
@@ -119,6 +119,14 @@
 function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL, $db_storage = TRUE) {
   $time = $_SERVER['REQUEST_TIME'];
 
+  // We manually track the expire time in $cache->expire.  When the object
+  // expires, we only allow one request to rebuild it to avoid cache stampedes.
+  // Other requests for the expired object while it is still being rebuilt get
+  // the expired object.
+  if ($expire == CACHE_TEMPORARY) {
+    $expire = variable_get('cache_lifetime', 2591999);
+  }
+
   // Create new cache object.
   $cache = new stdClass;
   $cache->cid = $cid;
@@ -140,10 +148,7 @@
   }
 
   // Save to memcache
-  if ($expire == CACHE_TEMPORARY) {
-    $expire = variable_get('cache_lifetime', 2591999);
-  }
-  dmemcache_set($cid, $cache, $expire, $table);
+  dmemcache_set($cid, $cache, 0, $table);
 }
 
 /**
Index: memcache.inc
===================================================================
--- memcache.inc	(Revision 2531)
+++ memcache.inc	(Arbeitskopie)
@@ -46,6 +46,14 @@
 function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL) {
   $time = $_SERVER['REQUEST_TIME'];
 
+  // We manually track the expire time in $cache->expire.  When the object
+  // expires, we only allow one request to rebuild it to avoid cache stampedes.
+  // Other requests for the expired object while it is still being rebuilt get
+  // the expired object.
+  if ($expire == CACHE_TEMPORARY) {
+    $expire = variable_get('cache_lifetime', 2591999);
+  }
+  
   // Create new cache object.
   $cache = new stdClass;
   $cache->cid = $cid;
@@ -55,13 +63,6 @@
   $cache->headers = $headers;
 
   // Save to memcache
-  if ($expire == CACHE_TEMPORARY) {
-    $expire = variable_get('cache_lifetime', 2591999);
-  }
-  // We manually track the expire time in $cache->expire.  When the object
-  // expires, we only allow one request to rebuild it to avoid cache stampedes.
-  // Other requests for the expired object while it is still being rebuilt get
-  // the expired object.
   dmemcache_set($cid, $cache, 0, $table);
 }
 
Index: memcache_admin/memcache_admin.module
===================================================================
--- memcache_admin/memcache_admin.module	(Revision 2531)
+++ memcache_admin/memcache_admin.module	(Arbeitskopie)
@@ -242,7 +242,7 @@
       foreach ($stats as $key => $value) {
         $stats[$key] = check_plain($value);
       }
-      $data[] = "<strong>$stat:</strong> ". theme('item_list', $stats);
+      $data[] = "<strong>$bin:</strong> ". theme('item_list', $stats);
     }
     if (!empty($data)) {
       $output = theme('item_list', $data);
