core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php | 2 ++ core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php index 101f18c..5f474d5 100644 --- a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php +++ b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php @@ -7,6 +7,7 @@ namespace Drupal\node\Form; +use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Component\Utility\String; @@ -122,6 +123,7 @@ public function submitForm(array &$form, array &$form_state) { $count = count($this->nodes); watchdog('content', 'Deleted @count posts.', array('@count' => $count)); drupal_set_message(format_plural($count, 'Deleted 1 post.', 'Deleted @count posts.')); + Cache::invalidateTags(array('content' => TRUE)); } $form_state['redirect_route']['route_name'] = 'node.content_overview'; } diff --git a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php index 1c1c336..93148d4 100644 --- a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php +++ b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php @@ -7,6 +7,7 @@ namespace Drupal\node\Form; +use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityConfirmFormBase; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Routing\UrlGeneratorInterface; @@ -90,6 +91,7 @@ public function submit(array $form, array &$form_state) { $node_type_storage = $this->entityManager->getStorageController('node_type'); $node_type = $node_type_storage->load($this->entity->bundle())->label(); drupal_set_message(t('@type %title has been deleted.', array('@type' => $node_type, '%title' => $this->entity->label()))); + Cache::invalidateTags(array('content' => TRUE)); $form_state['redirect_route']['route_name'] = ''; }