diff --git a/includes/cache.inc b/includes/cache.inc
index 9b60a7e..1d8aa39 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -280,6 +280,14 @@ interface DrupalCacheInterface {
   function set($cid, $data, $expire = CACHE_PERMANENT);
 
   /**
+   * Store multiple items in the persistent cache.
+   *
+   * @param $items
+   *   An array of cache items in the form array($cid => $data)
+   */
+  function setMultiple(array $items);
+
+  /**
    * Delete an item from the cache.
    *
    * @param $cid
@@ -293,7 +301,7 @@ interface DrupalCacheInterface {
    * @param $cids
    *   An array of $cids to delete.
    */
-  function deleteMultiple(Array $cids);
+  function deleteMultiple(array $cids);
 
   /**
    * Delete items from the cache using a wildcard prefix.
@@ -463,13 +471,36 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
     }
   }
 
+  function setMultiple(array $items) {
+    try {
+      $transaction = db_transaction();
+      $this->deleteMultiple(array_keys($items));
+
+      $query = db_insert($this->bin)->fields(array('cid', 'data', 'expire', 'created', 'serialized'));
+      foreach ($items as $cid => $item) {
+        $fields = array(
+          'cid' => $cid,
+          'data' => is_string($item['data']) ? $item['data'] : serialize($item['data']),
+          'expire' => isset($item['expire']) ? $item['expire'] : CACHE_PERMANENT,
+          'created' => REQUEST_TIME,
+          'serialized' => is_string($item['data']) ? 0 : 1,
+        );
+        $query->values($fields);
+      }
+      $query->execute();
+    }
+    catch (Exception $e) {
+      $transaction->rollback();
+    }
+  }
+
   function delete($cid) {
     db_delete($this->bin)
       ->condition('cid', $cid)
       ->execute();
   }
 
-  function deleteMultiple(Array $cids) {
+  function deleteMultiple(array $cids) {
     // Delete in chunks when a large array is passed.
     do {
       db_delete($this->bin)
diff --git a/modules/simpletest/tests/cache.test b/modules/simpletest/tests/cache.test
index 1235269..38cafab 100644
--- a/modules/simpletest/tests/cache.test
+++ b/modules/simpletest/tests/cache.test
@@ -152,9 +152,24 @@ class CacheSavingCase extends CacheTestCase {
     $this->assertTrue(isset($cached->data) && $cached->data == $test_object, t('Object is saved and restored properly.'));
   }
 
+  /**
+   * Test the saving of multiple objects.
+   */
+  function testSetMultiple() {
+    $items = array(
+      'cid_1' => array('data' => 1),
+      'cid_2' => array('data' => 2),
+    );
+    cache()->setMultiple($items);
+    $cids = array_keys($items);
+    $cached = cache()->getMultiple($cids);
+    $this->assertTrue($cached['cid_1']->data == $items['cid_1']['data']);
+    $this->assertTrue($cached['cid_2']->data == $items['cid_2']['data']);
+  }
+
   /*
    * Check or a variable is stored and restored properly.
-   **/
+   */
   function checkVariable($var) {
     cache()->set('test_var', $var);
     $cached = cache()->get('test_var');
