diff --git a/includes/cache.inc b/includes/cache.inc
index 8666874..2e94067 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -20,10 +20,15 @@ function _cache_get_object($bin) {
   static $cache_objects;
   if (!isset($cache_objects[$bin])) {
     $class = variable_get('cache_class_' . $bin);
-    if (!isset($class)) {
+    if (!isset($class) || !class_exists($class)) {
       $class = variable_get('cache_default_class', 'DrupalDatabaseCache');
     }
-    $cache_objects[$bin] = new $class($bin);
+    $instance = new $class($bin);
+    // Added environment status runtime check.
+    if ($instance instanceof DrupalEnvRelatedPlugin && !$instance->checkEnv()) {
+      $instance = new DrupalDatabaseCache($bin);
+    }
+    $cache_objects[$bin] = $instance;
   }
   return $cache_objects[$bin];
 }
@@ -302,12 +307,75 @@ 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 DrupalNullCache 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 plugin 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 the plugin to run.
+ * 
+ * @see DrupalDatabaseCache
+ *   For a functional plugin example.
+ * @see _cache_get_object
+ *   For a sample usage by core.
+ */
+interface DrupalEnvRelatedPlugin {
+  /**
+   * Check if environment is ready to run this plugin or 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.
+   * 
+   * Avoid any remote service calls here, except if you don't have any other
+   * solution.
+   * 
+   * @return bool
+   */
+  public function checkEnv();
+}
+
+/**
  * Default cache implementation.
  *
  * This is Drupal's default cache implementation. It uses the database to store
  * cached data. Each cache bin corresponds to a database table by the same name.
  */
-class DrupalDatabaseCache implements DrupalCacheInterface {
+class DrupalDatabaseCache implements DrupalCacheInterface, DrupalEnvRelatedPlugin {
   protected $bin;
 
   function __construct($bin) {
@@ -505,4 +573,16 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
       ->fetchField();
     return empty($result);
   }
+
+  /**
+   * Basically, this backend must be able to run on every system. No database
+   * means the site is down.
+   * 
+   * This is a foo sample implementation of DrupalEnvRelatedPlugin::checkEnv().
+   * 
+   * @see DrupalEnvRelatedPlugin::checkEnv()
+   */
+  public function checkEnv() {
+    return TRUE;
+  }
 }
