diff --git a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php index ebe4ec5..27a8000 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/Views/DefaultViewRecentComments.php @@ -77,7 +77,7 @@ public function setUp() { $this->node = $this->drupalCreateNode($node_data); // Force a flush of the in-memory storage. - \Drupal::service('views.views_data')->flush('comment'); + \Drupal::service('views.views_data')->delete('comment'); // Create some comments and attach them to the created node. for ($i = 0; $i < $this->masterDisplayResults; $i++) { diff --git a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php index a886dab..b3a06cd 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php @@ -47,7 +47,7 @@ public function testGetEntity() { $account->save(); comment_add_default_comment_field('node', 'page'); // Force a flush of the in-memory storage. - \Drupal::service('views.views_data')->flush('comment'); + \Drupal::service('views.views_data')->delete('comment'); $node = entity_create('node', array('uid' => $account->id(), 'type' => 'page')); $node->save(); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php index a727176..f10c4c4 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php @@ -55,8 +55,8 @@ public static function getInfo() { public function testHandlers() { comment_add_default_comment_field('node', 'page'); // Force a flush of the in-memory storage. - \Drupal::service('views.views_data')->flush('comment'); - \Drupal::service('views.views_data')->flush('comment_entity_statistics'); + \Drupal::service('views.views_data')->delete('comment'); + \Drupal::service('views.views_data')->delete('comment_entity_statistics'); $object_types = array_keys(ViewExecutable::viewsHandlerTypes()); foreach (drupal_container()->get('views.views_data')->get() as $base_table => $info) { diff --git a/core/modules/views/lib/Drupal/views/ViewsDataCache.php b/core/modules/views/lib/Drupal/views/ViewsDataCache.php index e251e84..79048f5 100644 --- a/core/modules/views/lib/Drupal/views/ViewsDataCache.php +++ b/core/modules/views/lib/Drupal/views/ViewsDataCache.php @@ -262,12 +262,14 @@ public function destruct() { * @param string $key * (Optional) The key to clear in the storage. Defaults to NULL. */ - public function flush($key = NULL) { + public function delete($key = NULL) { if ($key) { unset($this->storage[$key]); + $this->cacheBackend->delete($this->baseCid . ':' . $table); } else { $this->storage = array(); + $this->cacheBackend->deleteAll(); } }