diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
index 6f246f7..3eb08bd 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
@@ -648,9 +648,6 @@ protected function doDelete($entities) {
       $this->invokeFieldMethod('delete', $entity);
       $this->deleteFieldItems($entity);
     }
-
-    // Reset the cache as soon as the changes have been applied.
-    $this->resetCache($ids);
   }
 
   /**
@@ -709,7 +706,6 @@ protected function doSave($id, EntityInterface $entity) {
       if ($this->revisionTable) {
         $entity->setNewRevision(FALSE);
       }
-      $cache_ids = array($entity->id());
     }
     else {
       // Ensure the entity is still seen as new after assigning it an id,
@@ -742,12 +738,9 @@ protected function doSave($id, EntityInterface $entity) {
       if ($this->revisionTable) {
         $entity->setNewRevision(FALSE);
       }
-      // Reset general caches, but keep caches specific to certain entities.
-      $cache_ids = array();
     }
     $this->invokeFieldMethod($is_new ? 'insert' : 'update', $entity);
     $this->saveFieldItems($entity, !$is_new);
-    $this->resetCache($cache_ids);
 
     if (!$is_new && $this->dataTable) {
       $this->invokeTranslationHooks($entity);
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index 3dc3bb6..5b831bd 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -339,14 +339,18 @@ public function delete(array $entities) {
       return;
     }
 
+    // Allow code to run before deleting.
     $entity_class = $this->entityClass;
     $entity_class::preDelete($this, $entities);
     foreach ($entities as $entity) {
       $this->invokeHook('predelete', $entity);
     }
 
+    // Perform the delete and reset the static cache for the deleted entities.
     $this->doDelete($entities);
+    $this->resetCache(array_keys($entities));
 
+    // Allow code to run after deleting.
     $entity_class::postDelete($this, $entities);
     foreach ($entities as $entity) {
       $this->invokeHook('delete', $entity);
@@ -391,8 +395,9 @@ public function save(EntityInterface $entity) {
     $entity->preSave($this);
     $this->invokeHook('presave', $entity);
 
-    // Perform the save.
+    // Perform the save and reset the static cache for the changed entity.
     $return = $this->doSave($id, $entity);
+    $this->resetCache(array($id));
 
     // The entity is no longer new.
     $entity->enforceIsNew(FALSE);
diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php
index e02c97a..3c542e2 100644
--- a/core/modules/user/src/Entity/Role.php
+++ b/core/modules/user/src/Entity/Role.php
@@ -28,6 +28,7 @@
  *   },
  *   admin_permission = "administer permissions",
  *   config_prefix = "role",
+ *   static_cache = TRUE,
  *   entity_keys = {
  *     "id" = "id",
  *     "weight" = "weight",
diff --git a/core/modules/user/src/Tests/UserRoleAdminTest.php b/core/modules/user/src/Tests/UserRoleAdminTest.php
index bf9d88c..72653ca 100644
--- a/core/modules/user/src/Tests/UserRoleAdminTest.php
+++ b/core/modules/user/src/Tests/UserRoleAdminTest.php
@@ -53,12 +53,11 @@ function testRoleAdministration() {
     $this->assertRaw(t('The machine-readable name is already in use. It must be unique.'), 'Duplicate role warning displayed.');
 
     // Test renaming a role.
-    $old_name = $role_name;
     $role_name = '456';
     $edit = array('label' => $role_name);
     $this->drupalPostForm("admin/people/roles/manage/{$role->id()}", $edit, t('Save'));
     $this->assertRaw(t('Role %label has been updated.', array('%label' => $role_name)));
-    $new_role = entity_load('user_role', $old_name);
+    $new_role = entity_load('user_role', $role->id(), TRUE);
     $this->assertEqual($new_role->label(), $role_name, 'The role name has been successfully changed.');
 
     // Test deleting a role.
@@ -67,7 +66,7 @@ function testRoleAdministration() {
     $this->drupalPostForm(NULL, array(), t('Delete'));
     $this->assertRaw(t('Role %label has been deleted.', array('%label' => $role_name)));
     $this->assertNoLinkByHref("admin/people/roles/manage/{$role->id()}", 'Role edit link removed.');
-    $this->assertFalse(entity_load('user_role', $role_name), 'A deleted role can no longer be loaded.');
+    $this->assertFalse(entity_load('user_role', $role->id(), TRUE), 'A deleted role can no longer be loaded.');
 
     // Make sure that the system-defined roles can be edited via the user
     // interface.
