diff --git a/includes/cache-install.inc b/includes/cache-install.inc
deleted file mode 100644
index 8c47b00..0000000
--- a/includes/cache-install.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- * Provides a stub cache implementation to be used during installation.
- */
-
-/**
- * A stub cache implementation to be used during the installation process.
- *
- * 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. Obviously, using this cache implementation during
- * normal operations would have a negative impact on performance.
- */
-class DrupalFakeCache extends DrupalDatabaseCache implements DrupalCacheInterface {
-  function get($cid) {
-    return FALSE;
-  }
-
-  function getMultiple(&$cids) {
-    return array();
-  }
-
-  function set($cid, $data, $expire = CACHE_PERMANENT) {
-  }
-
-  function clear($cid = NULL, $wildcard = FALSE) {
-    // If there is a database cache, attempt to clear it whenever possible. The
-    // reason for doing this is that the database cache can accumulate data
-    // during installation due to any full bootstraps that may occur at the
-    // same time (for example, Ajax requests triggered by the installer). If we
-    // didn't try to clear it whenever this function is called, the data in the
-    // cache would become stale; for example, the installer sometimes calls
-    // variable_set(), which updates the {variable} table and then clears the
-    // cache to make sure that the next page request picks up the new value.
-    // Not actually clearing the cache here therefore leads old variables to be
-    // loaded on the first page requests after installation, which can cause
-    // subtle bugs, some of which would not be fixed unless the site
-    // administrator cleared the cache manually.
-    try {
-      if (class_exists('Database')) {
-        parent::clear($cid, $wildcard);
-      }
-    }
-    // If the attempt at clearing the cache causes an error, that means that
-    // either the database connection is not set up yet or the relevant cache
-    // table in the database has not yet been created, so we can safely do
-    // nothing here.
-    catch (Exception $e) {
-    }
-  }
-
-  function isEmpty() {
-    return TRUE;
-  }
-}
diff --git a/includes/cache.inc b/includes/cache.inc
index 8666874..d877a5b 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -17,13 +17,38 @@
 function _cache_get_object($bin) {
   // 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;
+  static $cache_objects, $default_class;
+
+  if (!isset($default_class)) {
+    $default_class = variable_get('cache_default_class', 'DrupalDatabaseCache');
+    // User provided default could be broken.
+    // FIXME: Forcing the system not to use the autoloader, with PHP 5.3
+    // class_exists() seems to fail when using it.
+    if (!class_exists($default_class, FALSE)) {
+      $default_class = 'DrupalDatabaseCache';
+    }
+  }
+
   if (!isset($cache_objects[$bin])) {
+    // Fetch the specialized instance.
     $class = variable_get('cache_class_' . $bin);
-    if (!isset($class)) {
-      $class = variable_get('cache_default_class', 'DrupalDatabaseCache');
+    if (!isset($class) || !class_exists($class, FALSE)) {
+      $class = $default_class;
     }
-    $cache_objects[$bin] = new $class($bin);
+    $instance = new $class($bin);
+
+    // Backend sanity runtime check.
+    if ($instance instanceof DrupalCriticalCacheInterface && !$instance->isHealthy()) {
+      if ($class === $default_class) {
+        // This implies that misconfigured sites will suffer from performance
+        // problems. This is probably good enough for downgraded critical
+        // situations.
+        $default_class = 'DrupalFakeCache';
+      }
+      $instance = new $default_class($bin);
+    }
+
+    $cache_objects[$bin] = $instance;
   }
   return $cache_objects[$bin];
 }
@@ -302,6 +327,68 @@ interface DrupalCacheInterface {
 }
 
 /**
+ * Neutral cache backend implementation.
+ * 
+ * This implements the Null Object pattern, it allows sites to fully disable
+ * one or more cache bin using this instance instead of a working one.
+ * 
+ * This is also the last resort implementation if no other backend can work
+ * on the underlaying environment.
+ */
+class DrupalFakeCache implements DrupalCacheInterface {
+  function __construct($bin) {}
+
+  function get($cid) {
+    return FALSE;
+  }
+
+  function getMultiple(&$cids) {
+    return array();
+  }
+
+  function set($cid, $data, $expire = CACHE_PERMANENT) {}
+
+  function clear($cid = NULL, $wildcard = FALSE) {}
+
+  function isEmpty() {
+    return TRUE;
+  }
+}
+
+/**
+ * Defines an strongly environment related plugin.
+ * 
+ * Every backend that relies on optional external, system, PHP library should
+ * implement this interface in order for core to be able to proceed to runtime
+ * graceful downgrade if the environment does meet the required dependencies
+ * for it to be able to run.
+ * 
+ * @see _cache_get_object()
+ *   For a sample usage by core.
+ */
+interface DrupalCriticalCacheInterface {
+  /**
+   * Check if environment is ready to run this backend.
+   * 
+   * For cache backends, this method implementation should probably use static
+   * shared cache among all instances so that costy environment checks wouldn't
+   * be done more than once.
+   * 
+   * This is the right place to test if system libraries are present, e.g. for
+   * memcache backend, this is the right place to check if the PEAR memcache or
+   * memcached library are here by doing extension_loaded() or function_exists()
+   * calls.
+   * 
+   * This method will be run when the cache object is being instanciated. The
+   * cache objects are lazy instanciated on-demand, you can use this method for
+   * creating bin storage space if you need it.
+   * 
+   * @return bool
+   */
+  public function isHealthy();
+}
+
+/**
  * 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 a74dfdf..f40e88e 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -271,7 +271,6 @@ 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';
-  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
