diff --git a/README.txt b/README.txt
index d486a33..7c01250 100644
--- a/README.txt
+++ b/README.txt
@@ -199,6 +199,24 @@ ADMINISTER
 
      See README.txt of the module.
 
+PAGE CACHE
+----------
+
+  Since the core Drupal cache provider uses the URL as the cache id
+  it's possible to get incorrect pages served from the cache when
+  using the Mobile Switch module if your mobile and non-mobile pages
+  share the same URL. Mobile Switch comes with a replacement for the
+  core Drupal database caching provider that appends the theme and an
+  indicator specifying whether the request is from a mobile device or
+  not to the cache id. To use this new cache provider for the page
+  cache simply add the following to the end of your settings.php file.
+
+    $conf['cache_backends'][] = 'sites/all/modules/contrib/mobile_switch/mobile_switch_database_cache.inc';
+    $conf['cache_class_cache_page'] = 'MobileSwitchDatabaseCache';
+
+  Just make sure the path to the Mobile Switch module directory
+  matches your installation.
+
 DEVELOPMENT
 -----------
 
diff --git a/mobile_switch_database_cache.inc b/mobile_switch_database_cache.inc
new file mode 100644
index 0000000..d94ae2e
--- /dev/null
+++ b/mobile_switch_database_cache.inc
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * @file
+ * Provides a cache implementation to be used in conjunction with the
+ * mobile_switch module.
+ *
+ * This is only intended to be used as a replacement for the page cache
+ * although it can be used as the default cache.
+ * It appends the override from the URL or cookie and whether or not
+ * the request was from a mobile device to the cache id.
+ */
+
+class MobileSwitchDatabaseCache extends DrupalDatabaseCache implements DrupalCacheInterface {
+
+  /**
+   * Overrides DrupalDatabaseCache::getMultiple().
+   */
+  function getMultiple(&$cids) {
+    if (is_array($cids)) {
+      foreach ($cids as $key => $cid) {
+        $cids[$key] = $cid . $this->getExtraCid();
+      }
+    }
+    return parent::getMultiple($cids);
+  }
+
+  /**
+   * Overrides DrupalDatabaseCache::set().
+   */
+  function set($cid, $data, $expire = CACHE_PERMANENT) {
+    $cid .= $this->getExtraCid();
+    return parent::set($cid, $data, $expire);
+  }
+
+  protected function getExtraCid() {
+    $extra = '';
+    if (function_exists('_mobile_switch_block_get_cookie') && _mobile_switch_block_get_cookie()) {
+      $extra .= ':' . _mobile_switch_block_get_cookie();
+    }
+    if (function_exists('mobile_switch_mobile_detect')) {
+      $browser = mobile_switch_mobile_detect();
+      $extra .= (is_array($browser) && $browser['ismobiledevice']) ? ':mobile' : ':notmobile';
+    }
+    return $extra;
+  }
+
+}
