diff --git a/includes/cache.inc b/includes/cache.inc
index caa5c03..7226c20 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -20,8 +20,9 @@ function cache($bin = 'cache') {
   // bin names to be passed as arguments.
   $bin = str_replace('cache_', '', $bin);
 
-  $cache_objects = &drupal_static('cache_objects', array());
-
+  // We do not use drupal_static() here because we do not want to change the
+  // storage of a cache bin mid-request.
+  static $cache_objects;
   if (!isset($cache_objects[$bin])) {
     $class = variable_get('cache_class_' . $bin);
     if (!isset($class)) {
@@ -347,50 +348,6 @@ interface DrupalCacheInterface {
 }
 
 /**
- * A stub cache implementation.
- *
- * The stub implementation is needed when database access is not yet available.
- * Because Drupal's caching system never requires that cached data be present,
- * these stub functions can short-circuit the process and sidestep the need for
- * any persistent storage. Using this cache implementation during normal
- * operations would have a negative impact on performance.
- *
- * This also can be used for testing purposes.
- */
-class DrupalNullCache implements DrupalCacheInterface {
-
-  function __construct($bin) {}
-
-  function get($cid) {
-    return FALSE;
-  }
-
-  function getMultiple(&$cids) {
-    return array();
-  }
-
-  function set($cid, $data, $expire = CACHE_PERMANENT) {}
-
-  function delete($cid) {}
-
-  function deleteMultiple(array $cids) {}
-
-  function deletePrefix($prefix) {}
-
-  function flush() {}
-
-  function expire() {}
-
-  function garbageCollection() {}
-
-  function clear($cid = NULL, $wildcard = FALSE) {}
-
-  function isEmpty() {
-    return TRUE;
-  }
-}
-
-/**
  * Default cache implementation.
  *
  * This is Drupal's default cache implementation. It uses the database to store
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 60a2ad2..7405f9f 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -272,7 +272,8 @@ function install_begin_request(&$install_state) {
   // because any data put in the cache during the installer is inherently
   // suspect, due to the fact that Drupal is not fully set up yet.
   require_once DRUPAL_ROOT . '/includes/cache.inc';
-  $conf['cache_default_class'] = 'DrupalNullCache';
+  require_once DRUPAL_ROOT . '/includes/cache-install.inc';
+  $conf['cache_default_class'] = 'DrupalFakeCache';
 
   // Prepare for themed output. We need to run this at the beginning of the
   // page request to avoid a different theme accidentally getting set. (We also
@@ -1513,14 +1514,9 @@ function install_finished(&$install_state) {
   $output = '<p>' . st('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name())) . '</p>';
   $output .= '<p>' . (isset($messages['error']) ? st('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => url(''))) : st('<a href="@url">Visit your new site</a>.', array('@url' => url('')))) . '</p>';
 
-  // Now that the install is completed, allow the default cache backend to be
-  // used. DrupalNullCache must be used up to this point to avoid cached data
-  // from the partially installed site being stored. The cache clear here
-  // ensures that any data cached from AJAX requests to the site which are
-  // outside of the install environment will also be cleared.
-  global $conf;
-  unset($conf['cache_default_class']);
-  drupal_static_reset('cache_objects');
+  // Flush all caches to ensure that any full bootstraps during the installer
+  // do not leave stale cached data, and that any content types or other items
+  // registered by the install profile are registered correctly.
   drupal_flush_all_caches();
 
   // Remember the profile which was used.
