diff --git a/core/core.services.yml b/core/core.services.yml index ac24e17..14a19f5 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 @@ -191,13 +177,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 @@ -333,7 +319,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 7962015..0fe568d 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -666,7 +666,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 af96028..0ddc470 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; } @@ -4916,9 +4916,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 838b32a..e0386de 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/CacheBackendInterface.php b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php index 3bdbc64..6b46cb0 100644 --- a/core/lib/Drupal/Core/Cache/CacheBackendInterface.php +++ b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php @@ -18,9 +18,9 @@ * set a variable with the name of the cache bin as its key and the name of * your class as its value. 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'] = 'MyCustomCache'; + * $settings['cache_classes']['cache_render'] = 'MyCustomCache'; * @endcode * * Additionally, you can register your cache implementation to be used by diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 4f98c50..254629a 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -224,7 +224,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); } @@ -267,7 +267,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/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 1bca18b..b063a06 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..3f503ca 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'])); } /** @@ -608,7 +608,7 @@ protected function _menu_build_tree($bid, array $parameters = array()) { // If we do not have this tree in the static cache, check {cache_menu}. 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..fb9a1d3 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php @@ -63,7 +63,7 @@ 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'), + $container->get('cache.data'), $entity_manager->getStorageController('node'), $container->get('book.manager') ); 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 1b3c8db..a352fb8 100644 --- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -260,7 +260,8 @@ public function flush($path = NULL) { drupal_theme_rebuild(); // Clear page caches when flushing. - \Drupal::cache('page')->deleteAll(); + \Drupal::cache('render')->deleteAll(); + return $this; } diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 324be33..2448d94 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -245,7 +245,7 @@ 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(); + \Drupal::cache('render')->deleteAll(); // Force JavaScript translation file re-creation for the new language. _locale_invalidate_js($language->id); } @@ -256,7 +256,7 @@ 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(); + \Drupal::cache('render')->deleteAll(); // Force JavaScript translation file re-creation for the modified language. _locale_invalidate_js($language->id); } @@ -277,7 +277,7 @@ function locale_language_delete($language) { // Changing the language settings impacts the interface: _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/lib/Drupal/system/Form/PerformanceForm.php b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php index fe689d0..a36e9b9 100644 --- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php +++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php @@ -22,19 +22,19 @@ class PerformanceForm extends ConfigFormBase { * * @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') ); } @@ -147,7 +147,7 @@ public function submitForm(array &$form, array &$form_state) { 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(); + $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 3ca1f19..8021cd9 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')); 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/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..ec79639 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 + */ + protected $outputBin = 'render'; + + /** + * Which cache bin to store query results in. + * + * @var string */ - var $table = 'views_results'; + 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..ba07bdf 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -522,27 +522,21 @@ 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? + \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? + \Drupal::cache('data')->deleteAll(); + \Drupal::cache('render')->deleteAll(); } /** @@ -550,7 +544,7 @@ function views_field_instance_config_delete(FieldInstanceConfigInterface $field_ */ function views_invalidate_cache() { // Clear the views cache. - \Drupal::cache('views_info')->deleteAll(); + \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']