diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index b8eeb4f..4963f71 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -712,7 +712,7 @@ public function updateModules(array $module_list, array $module_filenames = arra
    *   The class name.
    */
   protected function getClassName() {
-    $parts = array('service_container', $this->environment);
+    $parts = array('service_container', $this->environment, hash('crc32b', \Drupal::VERSION), Settings::get('deployment_identifier'));
     return implode('_', $parts);
   }
 
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 4c2dfbd..69fc722 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -287,6 +287,18 @@
 $settings['hash_salt'] = '';
 
 /**
+ * Deployment identifier.
+ *
+ * Drupal's dependency injection container will be automatically invalidated and
+ * rebuilt when the Drupal core version changes. When updating contributed or
+ * custom code that changes the container, changing this identifier will also
+ * allow the container to be invalidated as soon as code is deployed. This ID
+ * must only use characters valid in PHP function names as defined by
+ * http://php.net/manual/en/functions.user-defined.php
+ */
+$settings['deployment_identifier'] = '';
+
+/**
  * Access control for update.php script.
  *
  * If you are updating your Drupal installation using the update.php script but
