diff --git a/README.txt b/README.txt
index 5929838..81cc8e4 100644
--- a/README.txt
+++ b/README.txt
@@ -116,13 +116,24 @@ $conf = array(
 
 If you want to have multiple Drupal installations share memcached instances,
 you need to include a unique prefix for each Drupal installation in the $conf
-array of settings.php:
+array of settings.php. This can be a single string prefix, or a keyed array of
+bin => prefix pairs:
 
 $conf = array(
   ...
   'memcache_key_prefix' => 'something_unique',
 );
 
+Using a per-bin prefix:
+
+$conf = array(
+  ...
+  'memcache_key_prefix' => array(
+    'default' => 'something_unique',
+    'cache_page' => 'something_else_unique',
+  ),
+);
+
 ## SESSIONS ##
 
 NOTE: Session.inc is not yet ported to Drupal 7 and is not recommended for use
diff --git a/dmemcache.inc b/dmemcache.inc
index 5b0629a..4355d4c 100644
--- a/dmemcache.inc
+++ b/dmemcache.inc
@@ -439,8 +439,18 @@ function dmemcache_object($bin = NULL, $flush = FALSE) {
 
 function dmemcache_key($key, $bin = 'cache') {
   $prefix = '';
-  if ($prefix = variable_get('memcache_key_prefix', '')) {
-    $prefix .= '-';
+  if ($prefixes = variable_get('memcache_key_prefix', '')) {
+    if (is_array($prefixes)) {
+      if (!empty($prefixes[$bin])) {
+        $prefix = $prefixes[$bin] . '-';
+      } // Support default prefix for site
+      elseif (!empty($prefixes['default'])) {
+        $prefix = $prefixes['default'] . '-';
+      }
+    }
+    elseif (!empty($prefixes)) {
+      $prefix = $prefixes . '-';
+    }
   }
   // When simpletest is running, emulate the simpletest database prefix here
   // to avoid the child site setting cache entries in the parent site.
