diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
index 06c5dc2..828a4c6 100644
--- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php
+++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
@@ -42,6 +42,11 @@ class DatabaseBackend implements CacheBackendInterface {
   protected $checksumProvider;
 
   /**
+   * @var boolean
+   */
+  protected $useMbstring;
+
+  /**
    * Constructs a DatabaseBackend object.
    *
    * @param \Drupal\Core\Database\Connection $connection
@@ -58,6 +63,9 @@ public function __construct(Connection $connection, CacheTagsChecksumInterface $
     $this->bin = $bin;
     $this->connection = $connection;
     $this->checksumProvider = $checksum_provider;
+
+    // check if mb_check_encoding function is present
+    $this->useMbstring = function_exists('mb_check_encoding');
   }
 
   /**
@@ -407,7 +415,7 @@ protected function catchException(\Exception $e, $table_name = NULL) {
    */
   protected function normalizeCid($cid) {
     // Nothing to do if the ID is a US ASCII string of 255 characters or less.
-    $cid_is_ascii = mb_check_encoding($cid, 'ASCII');
+    $cid_is_ascii = $this->isAscii($cid);
     if (strlen($cid) <= 255 && $cid_is_ascii) {
       return $cid;
     }
@@ -421,6 +429,25 @@ protected function normalizeCid($cid) {
   }
 
   /**
+   * Checks to see if a given string is only made up of ascii characters
+   * Uses mb_check_encoding if present, otherwise falls back to preg_match
+   *
+   * @param string $text
+   *   the text to check
+   *
+   * @return boolean
+   *   true if $text only contains ascii characters, otherwise false
+   */
+  protected function isAscii($text) {
+    if ($this->useMbstring) {
+      return mb_check_encoding($text, 'ASCII');
+    }
+    else {
+      return preg_match('/^[[:ascii:]]+$/', $text);
+    }
+  }
+
+  /**
    * Defines the schema for the {cache_*} bin tables.
    */
   public function schemaDefinition() {
