diff --git a/core/core.services.yml b/core/core.services.yml index cf4ebab..87d317f 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -35,34 +35,20 @@ services: factory_method: get factory_service: cache_factory arguments: [entity] - cache.field: + cache.render: class: Drupal\Core\Cache\CacheBackendInterface tags: - { name: cache.bin } factory_method: get factory_service: cache_factory - arguments: [field] - cache.menu: + arguments: [render] + cache.data: class: Drupal\Core\Cache\CacheBackendInterface tags: - { name: cache.bin } factory_method: get factory_service: cache_factory - arguments: [menu] - cache.page: - class: Drupal\Core\Cache\CacheBackendInterface - tags: - - { name: cache.bin } - factory_method: get - factory_service: cache_factory - arguments: [page] - cache.path: - class: Drupal\Core\Cache\CacheBackendInterface - tags: - - { name: cache.bin } - factory_method: get - factory_service: cache_factory - arguments: [path] + arguments: [data] config.cachedstorage.storage: class: Drupal\Core\Config\FileStorage factory_class: Drupal\Core\Config\FileStorageFactory @@ -193,13 +179,13 @@ services: arguments: ['@entity.manager', '@form_builder'] plugin.manager.field.field_type: class: Drupal\Core\Field\FieldTypePluginManager - arguments: ['@container.namespaces', '@cache.field', '@language_manager', '@module_handler'] + arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler'] plugin.manager.field.widget: class: Drupal\Core\Field\WidgetPluginManager - arguments: ['@container.namespaces', '@cache.field', '@module_handler', '@language_manager', '@plugin.manager.field.field_type'] + arguments: ['@container.namespaces', '@cache.cache', '@module_handler', '@language_manager', '@plugin.manager.field.field_type'] plugin.manager.field.formatter: class: Drupal\Core\Field\FormatterPluginManager - arguments: ['@container.namespaces', '@cache.field', '@module_handler', '@language_manager', '@plugin.manager.field.field_type'] + arguments: ['@container.namespaces', '@cache.cache', '@module_handler', '@language_manager', '@plugin.manager.field.field_type'] plugin.manager.archiver: class: Drupal\Core\Archiver\ArchiverManager parent: default_plugin_manager @@ -343,7 +329,7 @@ services: - { name: event_subscriber } path.alias_manager.cached: class: Drupal\Core\CacheDecorator\AliasManagerCacheDecorator - arguments: ['@path.alias_manager', '@cache.path'] + arguments: ['@path.alias_manager', '@cache.data'] path.crud: class: Drupal\Core\Path\Path arguments: ['@database', '@module_handler'] diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 9e5c50f..bc115f3 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -668,7 +668,7 @@ function drupal_page_cache_get_cid(Request $request) { */ function drupal_page_get_cache(Request $request) { if (drupal_page_is_cacheable()) { - return \Drupal::cache('page')->get(drupal_page_cache_get_cid($request)); + return \Drupal::cache('render')->get(drupal_page_cache_get_cid($request)); } } diff --git a/core/includes/common.inc b/core/includes/common.inc index b7dfde2..b65d09d 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -3264,7 +3264,7 @@ function drupal_page_set_cache(Response $response, Request $request) { if ($page_compressed) { $cache->data['body'] = gzencode($cache->data['body'], 9, FORCE_GZIP); } - \Drupal::cache('page')->set($cache->cid, $cache->data, $cache->expire, $cache->tags); + \Drupal::cache('render')->set($cache->cid, $cache->data, $cache->expire, $cache->tags); } return $cache; } @@ -4901,9 +4901,7 @@ function drupal_flush_all_caches() { // sufficient, since new extensions cannot have any primed caches yet. $module_handler->invokeAll('cache_flush'); foreach (Cache::getBins() as $service_id => $cache_backend) { - if ($service_id != 'cache.menu') { - $cache_backend->deleteAll(); - } + $cache_backend->deleteAll(); } // Flush asset file caches. diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 41d17dd..7d53cfd 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -444,8 +444,8 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) { $cid = 'links:' . $menu_name . ':all:' . $mlid . ':' . $language_interface->id . ':' . (int) $max_depth; if (!isset($tree[$cid])) { - // If the static variable doesn't have the data, check {cache_menu}. - $cache = \Drupal::cache('menu')->get($cid); + // If the static variable doesn't have the data, check {cache_data}. + $cache = \Drupal::cache('data')->get($cid); if ($cache && isset($cache->data)) { // If the cache entry exists, it contains the parameters for // menu_build_tree(). @@ -472,7 +472,7 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) { } // Cache the tree building parameters using the page-specific cid. - \Drupal::cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name)); + \Drupal::cache('data')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name)); } // Build the tree using the parameters; the resulting tree will be cached @@ -579,8 +579,8 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail = } if (!isset($tree[$cid])) { - // If the static variable doesn't have the data, check {cache_menu}. - $cache = \Drupal::cache('menu')->get($cid); + // If the static variable doesn't have the data, check {cache_data}. + $cache = \Drupal::cache('data')->get($cid); if ($cache && isset($cache->data)) { // If the cache entry exists, it contains the parameters for // menu_build_tree(). @@ -648,7 +648,7 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail = $tree_parameters['active_trail'] = $active_trail; } // Cache the tree building parameters using the page-specific cid. - \Drupal::cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name)); + \Drupal::cache('data')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name)); } // Build the tree using the parameters; the resulting tree will be cached @@ -714,9 +714,9 @@ function _menu_build_tree($menu_name, array $parameters = array()) { } $tree_cid = 'links:' . $menu_name . ':tree-data:' . $language_interface->id . ':' . hash('sha256', serialize($parameters)); - // If we do not have this tree in the static cache, check {cache_menu}. + // If we do not have this tree in the static cache, check {cache_data}. if (!isset($trees[$tree_cid])) { - $cache = \Drupal::cache('menu')->get($tree_cid); + $cache = \Drupal::cache('data')->get($tree_cid); if ($cache && isset($cache->data)) { $trees[$tree_cid] = $cache->data; } @@ -759,7 +759,7 @@ function _menu_build_tree($menu_name, array $parameters = array()) { menu_tree_collect_node_links($data['tree'], $data['node_links']); // Cache the data, if it is not already in the cache. - \Drupal::cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name)); + \Drupal::cache('data')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name)); $trees[$tree_cid] = $data; } @@ -1538,7 +1538,7 @@ function menu_get_active_trail() { * might have been made to the router items or menu links. */ function menu_cache_clear_all() { - \Drupal::cache('menu')->deleteAll(); + \Drupal::cache('data')->deleteAll(); menu_reset_static_cache(); } diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index cf2b264..0b8bb7a 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -226,7 +226,7 @@ public function deleteMultiple(array $cids) { catch (\Exception $e) { // Create the cache table, which will be empty. This fixes cases during // core install where a cache table is cleared before it is set - // with {cache_block} and {cache_menu}. + // with {cache_render} and {cache_data}. if (!$this->ensureBinExists()) { $this->catchException($e); } @@ -269,7 +269,7 @@ public function deleteAll() { catch (\Exception $e) { // Create the cache table, which will be empty. This fixes cases during // core install where a cache table is cleared before it is set - // with {cache_block} and {cache_menu}. + // with {cache_render} and {cache_data}. if (!$this->ensureBinExists()) { $this->catchException($e); } diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php index 7cbadb2..4890afb 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php @@ -46,12 +46,9 @@ class EntityViewBuilder extends EntityControllerBase implements EntityController /** * The cache bin used to store the render cache. * - * @todo Defaults to 'cache' for now, until http://drupal.org/node/1194136 is - * fixed. - * * @var string */ - protected $cacheBin = 'cache'; + protected $cacheBin = 'render'; /** * The language manager. diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php b/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php index 5d01819..ae6e820 100644 --- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php +++ b/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php @@ -133,7 +133,7 @@ protected function loadFieldItems(array $entities) { foreach ($entities as $id => $entity) { $cids[] = "field:{$this->entityTypeId}:$id"; } - $cache = \Drupal::cache('field')->getMultiple($cids); + $cache = \Drupal::cache('entity')->getMultiple($cids); // Put the cached field values back into the entities and remove them from // the list of entities to query. foreach ($entities as $id => $entity) { @@ -182,7 +182,7 @@ protected function loadFieldItems(array $entities) { } } $cid = "field:{$this->entityTypeId}:$id"; - \Drupal::cache('field')->set($cid, $data); + \Drupal::cache('entity')->set($cid, $data); } } } @@ -206,7 +206,7 @@ protected function saveFieldItems(EntityInterface $entity, $update = TRUE) { if ($update) { $entity_type = $entity->getEntityType(); if ($entity_type->isFieldDataCacheable()) { - \Drupal::cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id()); + \Drupal::cache('entity')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id()); } } } @@ -226,7 +226,7 @@ protected function deleteFieldItems(EntityInterface $entity) { $entity_type = $entity->getEntityType(); if ($entity_type->isFieldDataCacheable()) { - \Drupal::cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id()); + \Drupal::cache('entity')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id()); } } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 37998b1..e9ed0ca 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -211,7 +211,7 @@ function _block_get_renderable_region($list = array()) { '#cache' => array( 'keys' => array($key, $settings['module']), 'granularity' => $settings['cache'], - 'bin' => 'block', + 'bin' => 'render', 'tags' => array('content' => TRUE), ), ); diff --git a/core/modules/block/block.services.yml b/core/modules/block/block.services.yml index 34293d9..f9c9b45 100644 --- a/core/modules/block/block.services.yml +++ b/core/modules/block/block.services.yml @@ -1,14 +1,7 @@ services: plugin.manager.block: class: Drupal\block\Plugin\Type\BlockManager - arguments: ['@container.namespaces', '@cache.block', '@language_manager', '@module_handler', '@string_translation'] - cache.block: - class: Drupal\Core\Cache\CacheBackendInterface - tags: - - { name: cache.bin } - factory_method: get - factory_service: cache_factory - arguments: [block] + arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler', '@string_translation'] theme.negotiator.block.admin_demo: class: Drupal\block\Theme\AdminDemoNegotiator tags: diff --git a/core/modules/book/book.install b/core/modules/book/book.install index 34db3f1..76ddc81 100644 --- a/core/modules/book/book.install +++ b/core/modules/book/book.install @@ -10,7 +10,7 @@ */ function book_uninstall() { // Clear book data out of the cache. - \Drupal::cache('menu')->deleteAll(); + \Drupal::cache('data')->deleteAll(); } /** diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php index 7b4f3f0..afdc638 100644 --- a/core/modules/book/lib/Drupal/book/BookManager.php +++ b/core/modules/book/lib/Drupal/book/BookManager.php @@ -444,7 +444,7 @@ public function deleteFromBook($nid) { } $this->updateOriginalParent($original); $this->books = NULL; - \Drupal::cache('menu')->deleteTags(array('bid' => $original['bid'])); + \Drupal::cache('data')->deleteTags(array('bid' => $original['bid'])); } /** @@ -606,9 +606,9 @@ protected function _menu_build_tree($bid, array $parameters = array()) { } $tree_cid = 'book-links:' . $bid . ':tree-data:' . $language_interface->id . ':' . hash('sha256', serialize($parameters)); - // If we do not have this tree in the static cache, check {cache_menu}. + // If we do not have this tree in the static cache, check {cache_data}. if (!isset($trees[$tree_cid])) { - $cache = \Drupal::cache('menu')->get($tree_cid); + $cache = \Drupal::cache('data')->get($tree_cid); if ($cache && isset($cache->data)) { $trees[$tree_cid] = $cache->data; } @@ -651,7 +651,7 @@ protected function _menu_build_tree($bid, array $parameters = array()) { $this->bookTreeCollectNodeLinks($data['tree'], $data['node_links']); // Cache the data, if it is not already in the cache. - \Drupal::cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('bid' => $bid)); + \Drupal::cache('data')->set($tree_cid, $data, Cache::PERMANENT, array('bid' => $bid)); $trees[$tree_cid] = $data; } @@ -744,7 +744,7 @@ public function saveBookLink(array $link, $new) { $query->execute(); } foreach ($affected_bids as $bid) { - \Drupal::cache('menu')->deleteTags(array('bid' => $bid)); + \Drupal::cache('data')->deleteTags(array('bid' => $bid)); } } @@ -1031,12 +1031,12 @@ public function bookMenuSubtreeData($link) { $cid = 'book-links:subtree-cid:' . $link['nid']; if (!isset($tree[$cid])) { - $cache = \Drupal::cache('menu')->get($cid); + $cache = \Drupal::cache('data')->get($cid); if ($cache && isset($cache->data)) { // If the cache entry exists, it will just be the cid for the actual data. // This avoids duplication of large amounts of data. - $cache = \Drupal::cache('menu')->get($cache->data); + $cache = \Drupal::cache('data')->get($cache->data); if ($cache && isset($cache->data)) { $data = $cache->data; @@ -1065,11 +1065,11 @@ public function bookMenuSubtreeData($link) { $tree_cid = 'book-links:subtree-data:' . hash('sha256', serialize($data)); // Cache the data, if it is not already in the cache. - if (!\Drupal::cache('menu')->get($tree_cid)) { - \Drupal::cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('bid' => $link['bid'])); + if (!\Drupal::cache('data')->get($tree_cid)) { + \Drupal::cache('data')->set($tree_cid, $data, Cache::PERMANENT, array('bid' => $link['bid'])); } // Cache the cid of the (shared) data using the menu and item-specific cid. - \Drupal::cache('menu')->set($cid, $tree_cid, Cache::PERMANENT, array('bid' => $link['bid'])); + \Drupal::cache('data')->set($cid, $tree_cid, Cache::PERMANENT, array('bid' => $link['bid'])); } // Check access for the current user to each item in the tree. $this->bookTreeCheckAccess($data['tree'], $data['node_links']); diff --git a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php index 41dfad2..41eb51f 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php @@ -9,7 +9,6 @@ use Drupal\book\BookManagerInterface; use Drupal\Component\Utility\Crypt; -use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Form\FormBase; use Drupal\node\NodeInterface; @@ -21,13 +20,6 @@ class BookAdminEditForm extends FormBase { /** - * The menu cache object for this controller. - * - * @var \Drupal\Core\Cache\CacheBackendInterface - */ - protected $cache; - - /** * The node storage controller. * * @var \Drupal\Core\Entity\EntityStorageControllerInterface @@ -44,15 +36,12 @@ class BookAdminEditForm extends FormBase { /** * Constructs a new BookAdminEditForm. * - * @param \Drupal\Core\Cache\CacheBackendInterface $cache - * The menu cache object to be used by this controller. * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_storage * The custom block storage controller. * @param \Drupal\book\BookManagerInterface $book_manager * The book manager. */ - public function __construct(CacheBackendInterface $cache, EntityStorageControllerInterface $node_storage, BookManagerInterface $book_manager) { - $this->cache = $cache; + public function __construct(EntityStorageControllerInterface $node_storage, BookManagerInterface $book_manager) { $this->nodeStorage = $node_storage; $this->bookManager = $book_manager; } @@ -63,7 +52,6 @@ public function __construct(CacheBackendInterface $cache, EntityStorageControlle public static function create(ContainerInterface $container) { $entity_manager = $container->get('entity.manager'); return new static( - $container->get('cache.menu'), $entity_manager->getStorageController('node'), $container->get('book.manager') ); @@ -109,8 +97,6 @@ public function submitForm(array &$form, array &$form_state) { $order = array_flip(array_keys($form_state['input']['table'])); $form['table'] = array_merge($order, $form['table']); - // Track updates. - $updated = FALSE; foreach (element_children($form['table']) as $key) { if ($form['table'][$key]['#item']) { $row = $form['table'][$key]; @@ -122,7 +108,6 @@ public function submitForm(array &$form, array &$form_state) { $link['weight'] = $values['weight']; $link['pid'] = $values['pid']; $this->bookManager->saveBookLink($link, FALSE); - $updated = TRUE; } // Update the title if changed. @@ -137,12 +122,6 @@ public function submitForm(array &$form, array &$form_state) { } } } - if ($updated) { - // Flush static and cache. - drupal_static_reset('book_menu_subtree_data'); - $cid = 'book-links:subtree-cid:' . $form['#node']->book['nid']; - $this->cache->delete($cid); - } drupal_set_message($this->t('Updated book %title.', array('%title' => $form['#node']->label()))); } diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php index 319e168..72dcdc2 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php @@ -149,9 +149,7 @@ public function submitForm(array &$form, array &$form_state) { // Flush all persistent caches. $this->moduleHandler->invokeAll('cache_flush'); foreach (Cache::getBins() as $service_id => $cache_backend) { - if ($service_id != 'cache.menu') { - $cache_backend->deleteAll(); - } + $cache_backend->deleteAll(); } drupal_set_message($this->t('@language translation of %label was deleted', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->name))); diff --git a/core/modules/field/field.module b/core/modules/field/field.module index f0e280c..d044090 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -277,7 +277,7 @@ function field_modules_uninstalled($modules) { * Clears the field info and field data caches. */ function field_cache_clear() { - \Drupal::cache('field')->deleteAll(); + \Drupal::cache('entity')->deleteAll(); field_info_cache_clear(); } diff --git a/core/modules/field/field.services.yml b/core/modules/field/field.services.yml index 43d3d1b..ef8b422 100644 --- a/core/modules/field/field.services.yml +++ b/core/modules/field/field.services.yml @@ -1,5 +1,5 @@ services: field.info: class: Drupal\field\FieldInfo - arguments: ['@cache.field', '@config.factory', '@module_handler', '@plugin.manager.field.field_type', '@language_manager'] + arguments: ['@cache.cache', '@config.factory', '@module_handler', '@plugin.manager.field.field_type', '@language_manager'] diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php index 1c0518e..4da0b3f 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php @@ -187,14 +187,14 @@ function testFieldAttachCache() { $cid = "field:$entity_type:" . $entity_init->id(); // Check that no initial cache entry is present. - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Non-cached: no initial cache entry'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Non-cached: no initial cache entry'); // Save, and check that no cache entry is present. $entity = clone($entity_init); $entity->{$this->field_name}->setValue($values); $entity = $this->entitySaveReload($entity); $cid = "field:$entity_type:" . $entity->id(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Non-cached: no cache entry on insert and load'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Non-cached: no cache entry on insert and load'); // Cacheable entity type. $entity_type = 'entity_test_cache'; @@ -207,7 +207,7 @@ function testFieldAttachCache() { // Check that no initial cache entry is present. $cid = "field:$entity_type:" . $entity->id(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no initial cache entry'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no initial cache entry'); // Save, and check that no cache entry is present. $entity = clone($entity_init); @@ -215,12 +215,12 @@ function testFieldAttachCache() { $entity->save(); $cid = "field:$entity_type:" . $entity->id(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no cache entry on insert'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no cache entry on insert'); // Load, and check that a cache entry is present with the expected values. $controller = $this->container->get('entity.manager')->getStorageController($entity->getEntityTypeId()); $controller->resetCache(); $controller->load($entity->id()); - $cache = \Drupal::cache('field')->get($cid); + $cache = \Drupal::cache('entity')->get($cid); $this->assertEqual($cache->data[$langcode][$this->field_name_2], $values, 'Cached: correct cache entry on load'); // Update with different values, and check that the cache entry is wiped. @@ -231,12 +231,12 @@ function testFieldAttachCache() { )); $entity->{$this->field_name_2} = $values; $entity->save(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no cache entry on update'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no cache entry on update'); // Load, and check that a cache entry is present with the expected values. $controller->resetCache(); $controller->load($entity->id()); - $cache = \Drupal::cache('field')->get($cid); + $cache = \Drupal::cache('entity')->get($cid); $this->assertEqual($cache->data[$langcode][$this->field_name_2], $values, 'Cached: correct cache entry on load'); // Create a new revision, and check that the cache entry is wiped. @@ -248,17 +248,17 @@ function testFieldAttachCache() { $entity->{$this->field_name_2} = $values; $entity->setNewRevision(); $entity->save(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no cache entry on new revision creation'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no cache entry on new revision creation'); // Load, and check that a cache entry is present with the expected values. $controller->resetCache(); $controller->load($entity->id()); - $cache = \Drupal::cache('field')->get($cid); + $cache = \Drupal::cache('entity')->get($cid); $this->assertEqual($cache->data[$langcode][$this->field_name_2], $values, 'Cached: correct cache entry on load'); // Delete, and check that the cache entry is wiped. $entity->delete(); - $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no cache entry after delete'); + $this->assertFalse(\Drupal::cache('entity')->get($cid), 'Cached: no cache entry after delete'); } /** diff --git a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php index 2aef8fc..2e5c308 100644 --- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -259,8 +259,9 @@ public function flush($path = NULL) { field_info_cache_clear(); drupal_theme_rebuild(); - // Clear page caches when flushing. - \Drupal::cache('page')->deleteAll(); + // Clear render cache when flushing. + \Drupal::cache('render')->deleteAll(); + return $this; } diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 324be33..05424d8 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -244,8 +244,8 @@ function locale_stream_wrappers() { */ function locale_language_insert($language) { // @todo move these two cache clears out. See http://drupal.org/node/1293252 - // Changing the language settings impacts the interface. - \Drupal::cache('page')->deleteAll(); + // Changing the language settings impacts the interface: clear render cache. + \Drupal::cache('render')->deleteAll(); // Force JavaScript translation file re-creation for the new language. _locale_invalidate_js($language->id); } @@ -255,8 +255,8 @@ function locale_language_insert($language) { */ function locale_language_update($language) { // @todo move these two cache clears out. See http://drupal.org/node/1293252 - // Changing the language settings impacts the interface. - \Drupal::cache('page')->deleteAll(); + // Changing the language settings impacts the interface: clear render cache. + \Drupal::cache('render')->deleteAll(); // Force JavaScript translation file re-creation for the modified language. _locale_invalidate_js($language->id); } @@ -275,9 +275,9 @@ function locale_language_delete($language) { // Remove translated configuration objects. \Drupal\locale\Locale::config()->deleteLanguageTranslations($language->id); - // Changing the language settings impacts the interface: + // Changing the language settings impacts the interface: clear render cache _locale_invalidate_js($language->id); - \Drupal::cache('page')->deleteAll(); + \Drupal::cache('render')->deleteAll(); // Clear locale translation caches. locale_translation_status_delete_languages(array($language->id)); diff --git a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php index e97101d..ab53370 100644 --- a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php +++ b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php @@ -55,15 +55,15 @@ function testPathCache() { // Visit the system path for the node and confirm a cache entry is // created. - \Drupal::cache('path')->deleteAll(); + \Drupal::cache('data')->deleteAll(); // Make sure the path is not converted to the alias. $this->drupalGet($edit['source'], array('alias' => TRUE)); - $this->assertTrue(\Drupal::cache('path')->get($edit['source']), 'Cache entry was created.'); + $this->assertTrue(\Drupal::cache('data')->get($edit['source']), 'Cache entry was created.'); // Visit the alias for the node and confirm a cache entry is created. - \Drupal::cache('path')->deleteAll(); + \Drupal::cache('data')->deleteAll(); $this->drupalGet($edit['alias']); - $this->assertTrue(\Drupal::cache('path')->get($edit['source']), 'Cache entry was created.'); + $this->assertTrue(\Drupal::cache('data')->get($edit['source']), 'Cache entry was created.'); } /** diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php index 4ba0a23..79af8fc 100644 --- a/core/modules/system/core.api.php +++ b/core/modules/system/core.api.php @@ -218,9 +218,14 @@ * When you request a cache object, you can specify the bin name in your call to * \Drupal::cache(). Alternatively, you can request a bin by getting service * "cache.nameofbin" from the container. The default bin is called "cache", with - * service name "cache.cache". + * service name "cache.cache", it is used to store common and frequently used + * caches like plugin information. * - * @todo: Document common cache bins in https://drupal.org/node/1194136 + * Other common cache bins are the following: + * - bootstrap: Small caches needed for the bootstrap on every request. + * - render: Contains cached HTML strings like cached pages and blocks, can + * grow to large size. + * - data: Contains data that can vary by path or similar context. * * A module can define a cache bin by defining a service in its * modulename.services.yml file as follows (substituting the desired name for @@ -299,9 +304,9 @@ * In a settings.php file, you can override the class used for a particular * cache bin. For example, if your implementation of * \Drupal\Core\Cache\CacheBackendInterface was called MyCustomCache, the - * following line would make Drupal use it for the 'cache_page' bin: + * following line would make Drupal use it for the 'cache_render' bin: * @code - * $settings['cache_classes']['cache_page'] = 'Drupal\full\namespace\to\MyCustomCache'; + * $settings['cache_classes']['cache_render'] = 'Drupal\full\namespace\to\MyCustomCache'; * @endcode * * Additionally, you can register your cache implementation to be used by diff --git a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php index fe689d0..eb81eba 100644 --- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php +++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php @@ -18,23 +18,23 @@ class PerformanceForm extends ConfigFormBase { /** - * The page cache object. + * The render cache object. * * @var \Drupal\Core\Cache\CacheBackendInterface */ - protected $pageCache; + protected $renderCache; /** * Constructs a PerformanceForm object. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. - * @param \Drupal\Core\Cache\CacheBackendInterface $page_cache + * @param \Drupal\Core\Cache\CacheBackendInterface $render_cache */ - public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $page_cache) { + public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $render_cache) { parent::__construct($config_factory); - $this->pageCache = $page_cache; + $this->renderCache = $render_cache; } /** @@ -43,7 +43,7 @@ public function __construct(ConfigFactoryInterface $config_factory, CacheBackend public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), - $container->get('cache.page') + $container->get('cache.render') ); } @@ -146,8 +146,9 @@ public function submitForm(array &$form, array &$form_state) { drupal_clear_css_cache(); drupal_clear_js_cache(); // This form allows page compression settings to be changed, which can - // invalidate the page cache, so it needs to be cleared on form submit. - $this->pageCache->deleteAll(); + // invalidate cached pages in the render cache, so it needs to be cleared on + // form submit. + $this->renderCache->deleteAll(); $this->configFactory->get('system.performance') ->set('cache.page.use_internal', $form_state['values']['cache']) diff --git a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/PageCacheTest.php b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/PageCacheTest.php index 7f961d3..2549252 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/PageCacheTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/PageCacheTest.php @@ -64,7 +64,7 @@ function testPageCacheTags() { $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT'); $cid_parts = array(url($path, array('absolute' => TRUE)), 'html'); $cid = sha1(implode(':', $cid_parts)); - $cache_entry = \Drupal::cache('page')->get($cid); + $cache_entry = \Drupal::cache('render')->get($cid); $this->assertIdentical($cache_entry->tags, array('content:1', 'system_test_cache_tags_page:1', 'pre_render:1')); Cache::invalidateTags($tags); diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php index bc2843c..251e528 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php @@ -14,7 +14,7 @@ */ abstract class CacheTestBase extends WebTestBase { - protected $default_bin = 'page'; + protected $default_bin = 'render'; protected $default_cid = 'test_temporary'; protected $default_value = 'CacheTest'; diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/ClearTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/ClearTest.php index ec1107c..f8e9499 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/ClearTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/ClearTest.php @@ -23,7 +23,7 @@ public static function getInfo() { } function setUp() { - $this->default_bin = 'page'; + $this->default_bin = 'render'; $this->default_value = $this->randomName(10); parent::setUp(); @@ -35,8 +35,7 @@ function setUp() { function testFlushAllCaches() { // Create cache entries for each flushed cache bin. $bins = Cache::getBins(); - $this->assertTrue($bins, 'cache_get_bins() returned bins to flush.'); - $bins['menu'] = $this->container->get('cache.menu'); + $this->assertTrue($bins, 'Cache::getBins() returned bins to flush.'); foreach ($bins as $bin => $cache_backend) { $cid = 'test_cid_clear' . $bin; $cache_backend->set($cid, $this->default_value); diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendTagTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendTagTest.php index 1645779..3b2b178 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendTagTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendTagTest.php @@ -47,7 +47,7 @@ public function containerBuild(ContainerBuilder $container) { public function testTagInvalidations() { // Create cache entry in multiple bins. $tags = array('test_tag' => array(1, 2, 3)); - $bins = array('path', 'bootstrap', 'page'); + $bins = array('data', 'bootstrap', 'render'); foreach ($bins as $bin) { $bin = \Drupal::cache($bin); $bin->set('test', 'value', Cache::PERMANENT, $tags); @@ -71,7 +71,7 @@ public function testTagInvalidations() { public function testTagDeletetions() { // Create cache entry in multiple bins. $tags = array('test_tag' => array(1, 2, 3)); - $bins = array('path', 'bootstrap', 'page'); + $bins = array('data', 'bootstrap', 'render'); foreach ($bins as $bin) { $bin = \Drupal::cache($bin); $bin->set('test', 'value', Cache::PERMANENT, $tags); diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php index b245c34..0856d0b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php @@ -102,7 +102,7 @@ protected function verifyPageCacheTags($path, $expected_tags) { $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT'); $cid_parts = array(url($path, array('absolute' => TRUE)), 'html'); $cid = sha1(implode(':', $cid_parts)); - $cache_entry = \Drupal::cache('page')->get($cid); + $cache_entry = \Drupal::cache('render')->get($cid); $this->assertIdentical($cache_entry->tags, $expected_tags); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsTestBase.php index 194976a..a236c3b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsTestBase.php @@ -48,7 +48,7 @@ protected function verifyPageCache($path, $hit_or_miss, $tags = FALSE) { if ($hit_or_miss === 'HIT' && is_array($tags)) { $cid_parts = array(url($path, array('absolute' => TRUE)), 'html'); $cid = sha1(implode(':', $cid_parts)); - $cache_entry = \Drupal::cache('page')->get($cid); + $cache_entry = \Drupal::cache('render')->get($cid); $this->assertIdentical($cache_entry->tags, $tags); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php index 1264577..bd2ceb9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php @@ -141,7 +141,7 @@ protected function toggleFieldTranslatability($entity_type) { $field = FieldService::fieldInfo()->getField($entity_type, $field_name); $this->assertEqual($field->isTranslatable(), $translatable, 'Field translatability changed.'); } - \Drupal::cache('field')->deleteAll(); + \Drupal::cache('entity')->deleteAll(); } } diff --git a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php index f325b85..9b93095 100644 --- a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php +++ b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php @@ -126,7 +126,7 @@ function testProcessedCache() { // Load the entity and check that the field cache contains the expected // data. $entity = entity_load($entity_type, $entity->id()); - $cache = \Drupal::cache('field')->get("field:$entity_type:" . $entity->id()); + $cache = \Drupal::cache('entity')->get("field:$entity_type:" . $entity->id()); $this->assertEqual($cache->data, array( Language::LANGCODE_NOT_SPECIFIED => array( 'summary_field' => array( @@ -156,7 +156,7 @@ function testProcessedCache() { ), ), ); - \Drupal::cache('field')->set("field:$entity_type:" . $entity->id(), $data); + \Drupal::cache('entity')->set("field:$entity_type:" . $entity->id(), $data); $entity = entity_load($entity_type, $entity->id(), TRUE); $this->assertEqual($entity->summary_field->processed, 'Cached processed value'); $this->assertEqual($entity->summary_field->summary_processed, 'Cached summary processed value'); diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php index bcf2c85..e03f3b7 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php +++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php @@ -44,7 +44,7 @@ public function __construct($type, \Traversable $namespaces, CacheBackendInterfa ); $this->alterInfo('views_plugins_' . $type); - $this->setCacheBackend($cache_backend, $language_manager, 'views_' . $type . '_plugins'); + $this->setCacheBackend($cache_backend, $language_manager, "views:{$type}_plugins"); } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php index 665b7a5..5c4a0eb 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php @@ -32,9 +32,18 @@ var $storage = array(); /** - * What table to store data in. + * Which cache bin to store the rendered output in. + * + * @var string */ - var $table = 'views_results'; + protected $outputBin = 'render'; + + /** + * Which cache bin to store query results in. + * + * @var string + */ + protected $resultsBin = 'data'; /** * Stores the cache ID used for the results cache. @@ -125,12 +134,12 @@ public function cacheSet($type) { 'total_rows' => isset($this->view->total_rows) ? $this->view->total_rows : 0, 'current_page' => $this->view->getCurrentPage(), ); - \Drupal::cache($this->table)->set($this->generateResultsKey(), $data, $this->cacheSetExpire($type), $this->getCacheTags()); + \Drupal::cache($this->resultsBin)->set($this->generateResultsKey(), $data, $this->cacheSetExpire($type), $this->getCacheTags()); break; case 'output': $this->storage['output'] = $this->view->display_handler->output; $this->gatherHeaders(); - \Drupal::cache($this->table)->set($this->generateOutputKey(), $this->storage, $this->cacheSetExpire($type), $this->getCacheTags()); + \Drupal::cache($this->outputBin)->set($this->generateOutputKey(), $this->storage, $this->cacheSetExpire($type), $this->getCacheTags()); break; } } @@ -149,7 +158,7 @@ public function cacheGet($type) { case 'results': // Values to set: $view->result, $view->total_rows, $view->execute_time, // $view->current_page. - if ($cache = \Drupal::cache($this->table)->get($this->generateResultsKey())) { + if ($cache = \Drupal::cache($this->resultsBin)->get($this->generateResultsKey())) { if (!$cutoff || $cache->created > $cutoff) { $this->view->result = $cache->data['result']; $this->view->total_rows = $cache->data['total_rows']; @@ -160,7 +169,7 @@ public function cacheGet($type) { } return FALSE; case 'output': - if ($cache = \Drupal::cache($this->table)->get($this->generateOutputKey())) { + if ($cache = \Drupal::cache($this->outputBin)->get($this->generateOutputKey())) { if (!$cutoff || $cache->created > $cutoff) { $this->storage = $cache->data; $this->view->display_handler->output = $cache->data['output']; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index bc99b02..2c6d4bd 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -157,15 +157,15 @@ public function initDisplay(ViewExecutable $view, array &$display, array &$optio $skip_cache = \Drupal::config('views.settings')->get('skip_cache'); if (empty($view->editing) || !$skip_cache) { - $cid = 'unpackOptions:' . hash('sha256', serialize(array($this->options, $options))) . ':' . \Drupal::languageManager()->getCurrentLanguage()->id; + $cid = 'views:unpack_options:' . hash('sha256', serialize(array($this->options, $options))) . ':' . \Drupal::languageManager()->getCurrentLanguage()->id; if (empty(static::$unpackOptions[$cid])) { - $cache = \Drupal::cache('views_info')->get($cid); + $cache = \Drupal::cache('data')->get($cid); if (!empty($cache->data)) { $this->options = $cache->data; } else { $this->unpackOptions($this->options, $options); - \Drupal::cache('views_info')->set($cid, $this->options); + \Drupal::cache('data')->set($cid, $this->options); } static::$unpackOptions[$cid] = $this->options; } diff --git a/core/modules/views/views.install b/core/modules/views/views.install index d3c0dee..e8e3e5e 100644 --- a/core/modules/views/views.install +++ b/core/modules/views/views.install @@ -5,25 +5,9 @@ * Contains install and update functions for Views. */ -use Drupal\Core\Database\Database; - /** * Implements hook_install(). */ function views_install() { module_set_weight('views', 10); } - -/** - * Provide an initial schema. - * - * @see UpdateModuleHandler::enable(). - */ -function views_schema_0() { - module_load_install('system'); - // Add the cache_views_info and cache_views_results tables. - $cache_schema = system_schema_cache_8007(); - $schema['cache_views_info'] = $cache_schema; - $schema['cache_views_results'] = $cache_schema; - return $schema; -} diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 922a8d9..5c2c166 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -522,35 +522,30 @@ function views_language_list($field = 'name', $flags = Language::STATE_ALL) { } /** - * Implements hook_ENTITY_TYPE_create() for 'field_instance_config'. - */ -function views_field_instance_config_create(FieldInstanceConfigInterface $field_instance) { - \Drupal::cache('views_info')->deleteAll(); - \Drupal::cache('views_results')->deleteAll(); -} - -/** * Implements hook_ENTITY_TYPE_update() for 'field_instance_config'. */ function views_field_instance_config_update(FieldInstanceConfigInterface $field_instance) { - \Drupal::cache('views_info')->deleteAll(); - \Drupal::cache('views_results')->deleteAll(); + // @todo: Is this necessary? Use cache tags to only delete Views' cache data? + \Drupal::cache('data')->deleteAll(); + \Drupal::cache('render')->deleteAll(); } /** * Implements hook_ENTITY_TYPE_delete() for 'field_instance_config'. */ function views_field_instance_config_delete(FieldInstanceConfigInterface $field_instance) { - \Drupal::cache('views_info')->deleteAll(); - \Drupal::cache('views_results')->deleteAll(); + // @todo: Is this necessary? Use cache tags to only delete Views' cache data? + \Drupal::cache('data')->deleteAll(); + \Drupal::cache('render')->deleteAll(); } /** * Invalidate the views cache, forcing a rebuild on the next grab of table data. */ function views_invalidate_cache() { - // Clear the views cache. - \Drupal::cache('views_info')->deleteAll(); + // Clear Views' info cache entries. + // @todo: Use cache tags? + \Drupal::cache('data')->deleteAll(); // Clear the page and block cache. Cache::deleteTags(array('content' => TRUE)); diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml index f42a7bd..92c3144 100644 --- a/core/modules/views/views.services.yml +++ b/core/modules/views/views.services.yml @@ -1,64 +1,64 @@ services: plugin.manager.views.access: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [access, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [access, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.area: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [area, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [area, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.argument: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [argument, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [argument, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.argument_default: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [argument_default, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [argument_default, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.argument_validator: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [argument_validator, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [argument_validator, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.cache: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [cache, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [cache, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.display_extender: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [display_extender, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [display_extender, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.display: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [display, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [display, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.exposed_form: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [exposed_form, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [exposed_form, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.field: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [field, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [field, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.filter: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [filter, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [filter, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.join: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [join, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [join, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.pager: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [pager, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [pager, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.query: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [query, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [query, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.relationship: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [relationship, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [relationship, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.row: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [row, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [row, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.sort: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [sort, '@container.namespaces', '@views.views_data', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [sort, '@container.namespaces', '@views.views_data', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.style: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [style, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [style, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] plugin.manager.views.wizard: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [wizard, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler'] + arguments: [wizard, '@container.namespaces', '@cache.data', '@language_manager', '@module_handler'] views.views_data: class: Drupal\views\ViewsData - arguments: ['@cache.views_info', '@config.factory', '@module_handler', '@language_manager'] + arguments: ['@cache.data', '@config.factory', '@module_handler', '@language_manager'] views.views_data_helper: class: Drupal\views\ViewsDataHelper arguments: ['@views.views_data'] @@ -68,20 +68,6 @@ services: views.analyzer: class: Drupal\views\Analyzer arguments: ['@module_handler'] - cache.views_info: - class: Drupal\Core\Cache\CacheBackendInterface - tags: - - { name: cache.bin } - factory_method: get - factory_service: cache_factory - arguments: [views_info] - cache.views_results: - class: Drupal\Core\Cache\CacheBackendInterface - tags: - - { name: cache.bin } - factory_method: get - factory_service: cache_factory - arguments: [views_results] views.route_subscriber: class: Drupal\views\EventSubscriber\RouteSubscriber arguments: ['@entity.manager', '@state']