diff --git a/dmemcache.inc b/dmemcache.inc
index 884ca05..08e2127 100644
--- a/dmemcache.inc
+++ b/dmemcache.inc
@@ -295,6 +295,12 @@ function dmemcache_object($bin = NULL, $flush = FALSE) {
         drupal_set_message('You must enable the PECL memcached or memcache extension to use memcache.inc.', 'error');
         return;
       }
+
+      // Indicate wether to connect to memcache using a persistent connection.
+      if (empty($memcache_persistent)) {
+        $memcache_persistent = variable_get('memcache_persistent', FALSE);
+      }
+
       // A variable to track whether we've connected to the first server.
       $init = FALSE;
 
@@ -305,13 +311,18 @@ function dmemcache_object($bin = NULL, $flush = FALSE) {
 
           // This is a server that belongs to this cluster.
           if ($memcache instanceof Memcache && !$init) {
-            // If using PECL memcache extension, use ->connect for first server
-            if ($memcache->connect($host, $port)) {
+            // If using PECL memcache extension, use ->(p)connect for first server
+            if ($memcache_persistent && $memcache->pconnect($host, $port)) {
+              $init = TRUE;
+            }
+            elseif (!memcache_persistent && $memcache->connect($host, $port)) {
               $init = TRUE;
             }
           }
-          else if ($memcache->addServer($host, $port) && !$init) {
+          else {
+            if ($memcache->addServer($host, $port, $memcache_persistent) && !$init) {
               $init = TRUE;
+            }
           }
         }
       }
