diff --git a/core/includes/cache.inc b/core/includes/cache.inc
index b39b7ff..634f188 100644
--- a/core/includes/cache.inc
+++ b/core/includes/cache.inc
@@ -24,6 +24,9 @@
  *   The cache object associated with the specified bin.
  *
  * @see \Drupal\Core\Cache\CacheBackendInterface
+ *
+ * @deprecated as of 8.x. This will be removed in
+ *   https://drupal.org/node/2198339. Use \Drupal::cache() instead.
  */
 function cache($bin = 'cache') {
   return \Drupal::cache($bin);
diff --git a/core/includes/common.inc b/core/includes/common.inc
index a7584d3..1135929 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3180,7 +3180,7 @@ function drupal_page_set_cache(Response $response, Request $request) {
       if ($page_compressed) {
         $cache->data['body'] = gzencode($cache->data['body'], 9, FORCE_GZIP);
       }
-      cache('page')->set($cache->cid, $cache->data, $cache->expire, $cache->tags);
+      \Drupal::cache('page')->set($cache->cid, $cache->data, $cache->expire, $cache->tags);
     }
     return $cache;
   }
@@ -4074,7 +4074,7 @@ function drupal_render_cache_get(array $elements) {
   }
   $bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'cache';
 
-  if (!empty($cid) && $cache = cache($bin)->get($cid)) {
+  if (!empty($cid) && $cache = \Drupal::cache($bin)->get($cid)) {
     $cached_element = $cache->data;
     // Add additional libraries, JavaScript, CSS and other data attached
     // to this element.
@@ -4128,7 +4128,7 @@ function drupal_render_cache_set(&$markup, array $elements) {
   $bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'cache';
   $expire = isset($elements['#cache']['expire']) ? $elements['#cache']['expire'] : Cache::PERMANENT;
   $tags = drupal_render_collect_cache_tags($elements);
-  cache($bin)->set($cid, $data, $expire, $tags);
+  \Drupal::cache($bin)->set($cid, $data, $expire, $tags);
 }
 
 /**
@@ -4416,7 +4416,7 @@ function drupal_cache_tags_page_get(Response $response) {
  *   added to this string and is also part of the cache key in
  *   drupal_render_cache_set() and drupal_render_cache_get().
  * @param $expire
- *   The cache expire time, passed eventually to cache()->set().
+ *   The cache expire time, passed eventually to \Drupal::cache()->set().
  * @param $granularity
  *   One or more granularity constants passed to drupal_render_cid_parts().
  *
diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index c2054c2..aa74a2f 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -121,7 +121,7 @@ function entity_get_form_modes($entity_type = NULL) {
   $form_modes = &drupal_static(__FUNCTION__);
   if (!$form_modes) {
     $langcode = language(Language::TYPE_INTERFACE)->id;
-    if ($cache = cache()->get("entity_form_mode_info:$langcode")) {
+    if ($cache = \Drupal::cache()->get("entity_form_mode_info:$langcode")) {
       $form_modes = $cache->data;
     }
     else {
@@ -131,7 +131,7 @@ function entity_get_form_modes($entity_type = NULL) {
         $form_modes[$form_mode_entity_type][$form_mode_name] = (array) $form_mode;
       }
       drupal_alter('entity_form_mode_info', $form_modes);
-      cache()->set("entity_form_mode_info:$langcode", $form_modes, Cache::PERMANENT, array('entity_info' => TRUE));
+      \Drupal::cache()->set("entity_form_mode_info:$langcode", $form_modes, Cache::PERMANENT, array('entity_info' => TRUE));
     }
   }
 
@@ -159,7 +159,7 @@ function entity_get_view_modes($entity_type = NULL) {
   $view_modes = &drupal_static(__FUNCTION__);
   if (!$view_modes) {
     $langcode = language(Language::TYPE_INTERFACE)->id;
-    if ($cache = cache()->get("entity_view_mode_info:$langcode")) {
+    if ($cache = \Drupal::cache()->get("entity_view_mode_info:$langcode")) {
       $view_modes = $cache->data;
     }
     else {
@@ -169,7 +169,7 @@ function entity_get_view_modes($entity_type = NULL) {
         $view_modes[$view_mode_entity_type][$view_mode_name] = (array) $view_mode;
       }
       drupal_alter('entity_view_mode_info', $view_modes);
-      cache()->set("entity_view_mode_info:$langcode", $view_modes, Cache::PERMANENT, array('entity_info' => TRUE));
+      \Drupal::cache()->set("entity_view_mode_info:$langcode", $view_modes, Cache::PERMANENT, array('entity_info' => TRUE));
     }
   }
 
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 7a79f5e..c491641 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -1086,7 +1086,7 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) {
 
   if (!isset($tree[$cid])) {
     // If the static variable doesn't have the data, check {cache_menu}.
-    $cache = cache('menu')->get($cid);
+    $cache = \Drupal::cache('menu')->get($cid);
     if ($cache && isset($cache->data)) {
       // If the cache entry exists, it contains the parameters for
       // menu_build_tree().
@@ -1113,7 +1113,7 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) {
       }
 
       // Cache the tree building parameters using the page-specific cid.
-      cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
+      \Drupal::cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
     }
 
     // Build the tree using the parameters; the resulting tree will be cached
@@ -1231,7 +1231,7 @@ 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 = cache('menu')->get($cid);
+      $cache = \Drupal::cache('menu')->get($cid);
       if ($cache && isset($cache->data)) {
         // If the cache entry exists, it contains the parameters for
         // menu_build_tree().
@@ -1299,7 +1299,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.
-        cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
+        \Drupal::cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
       }
 
       // Build the tree using the parameters; the resulting tree will be cached
@@ -1367,7 +1367,7 @@ function _menu_build_tree($menu_name, array $parameters = array()) {
 
   // If we do not have this tree in the static cache, check {cache_menu}.
   if (!isset($trees[$tree_cid])) {
-    $cache = cache('menu')->get($tree_cid);
+    $cache = \Drupal::cache('menu')->get($tree_cid);
     if ($cache && isset($cache->data)) {
       $trees[$tree_cid] = $cache->data;
     }
@@ -1410,7 +1410,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.
-    cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name));
+    \Drupal::cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name));
     $trees[$tree_cid] = $data;
   }
 
@@ -2370,7 +2370,7 @@ function menu_get_active_trail() {
  * might have been made to the router items or menu links.
  */
 function menu_cache_clear_all() {
-  cache('menu')->deleteAll();
+  \Drupal::cache('menu')->deleteAll();
   menu_reset_static_cache();
 }
 
@@ -2720,13 +2720,13 @@ function _menu_clear_page_cache() {
   // Clear the page and block caches, but at most twice, including at
   //  the end of the page load when there are multiple links saved or deleted.
   if ($cache_cleared == 0) {
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
     // Keep track of which menus have expanded items.
     _menu_set_expanded_menus();
     $cache_cleared = 1;
   }
   elseif ($cache_cleared == 1) {
-    drupal_register_shutdown_function('cache_invalidate_tags', array('content' => TRUE));
+    drupal_register_shutdown_function('Drupal\Core\Cache\Cache::invalidateTags', array('content' => TRUE));
     // Keep track of which menus have expanded items.
     drupal_register_shutdown_function('_menu_set_expanded_menus');
     $cache_cleared = 2;
diff --git a/core/includes/module.inc b/core/includes/module.inc
index 429f5db..c9a13ff 100644
--- a/core/includes/module.inc
+++ b/core/includes/module.inc
@@ -30,7 +30,7 @@
  */
 function system_list($type) {
   $lists = &drupal_static(__FUNCTION__);
-  if ($cached = cache('bootstrap')->get('system_list')) {
+  if ($cached = \Drupal::cache('bootstrap')->get('system_list')) {
     $lists = $cached->data;
   }
   else {
@@ -92,7 +92,7 @@ function system_list($type) {
       // Set the theme engine prefix.
       $lists['theme'][$key]->prefix = ($lists['theme'][$key]->info['engine'] == 'theme') ? $base_key : $lists['theme'][$key]->info['engine'];
     }
-    cache('bootstrap')->set('system_list', $lists);
+    \Drupal::cache('bootstrap')->set('system_list', $lists);
   }
   // To avoid a separate database lookup for the filepath, prime the
   // drupal_get_filename() static cache with all enabled modules and themes.
@@ -110,8 +110,8 @@ function system_list_reset() {
   drupal_static_reset('system_list');
   drupal_static_reset('system_rebuild_module_data');
   drupal_static_reset('list_themes');
-  cache('bootstrap')->delete('system_list');
-  cache()->delete('system_info');
+  \Drupal::cache('bootstrap')->delete('system_list');
+  \Drupal::cache()->delete('system_info');
   // Remove last known theme data state.
   // This causes system_list() to call system_rebuild_theme_data() on its next
   // invocation. When enabling a module that implements hook_system_info_alter()
diff --git a/core/includes/schema.inc b/core/includes/schema.inc
index c9a8514..c9ee6ae 100644
--- a/core/includes/schema.inc
+++ b/core/includes/schema.inc
@@ -65,7 +65,7 @@ function drupal_get_complete_schema($rebuild = FALSE) {
 
   if (!isset($schema) || $rebuild) {
     // Try to load the schema from cache.
-    if (!$rebuild && $cached = cache()->get('schema')) {
+    if (!$rebuild && $cached = \Drupal::cache()->get('schema')) {
       $schema = $cached->data;
     }
     // Otherwise, rebuild the schema cache.
@@ -82,7 +82,7 @@ function drupal_get_complete_schema($rebuild = FALSE) {
         // That would break modules which use $schema further down the line.
         $current = (array) \Drupal::moduleHandler()->invoke($module, 'schema');
         // Set 'module' and 'name' keys for each table, and remove descriptions,
-        // as they needlessly slow down cache()->get() for every single request.
+        // as they needlessly slow down \Drupal::cache()->get() for every single request.
         _drupal_schema_initialize($current, $module);
         $schema = array_merge($schema, $current);
       }
@@ -94,7 +94,7 @@ function drupal_get_complete_schema($rebuild = FALSE) {
       // If the schema is empty, avoid saving it: some database engines require
       // the schema to perform queries, and this could lead to infinite loops.
       if (!empty($schema) && (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL)) {
-        cache()->set('schema', $schema, Cache::PERMANENT, array('schema' => TRUE));
+        \Drupal::cache()->set('schema', $schema, Cache::PERMANENT, array('schema' => TRUE));
       }
     }
   }
diff --git a/core/lib/Drupal/Core/Cache/CacheBackendInterface.php b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php
index 0046918..3bdbc64 100644
--- a/core/lib/Drupal/Core/Cache/CacheBackendInterface.php
+++ b/core/lib/Drupal/Core/Cache/CacheBackendInterface.php
@@ -38,8 +38,8 @@
  * To access your custom cache bin, specify the name of the bin when storing
  * or retrieving cached data:
  * @code
- *  cache('custom_bin')->set($cid, $data, $expire);
- *  cache('custom_bin')->get($cid);
+ *  \Drupal::cache('custom_bin')->set($cid, $data, $expire);
+ *  \Drupal::cache('custom_bin')->get($cid);
  * @endcode
  *
  * There are two ways to "remove" a cache item:
@@ -66,7 +66,7 @@
  * the other requests can proceed using the stale value. As soon as the cache
  * item has been updated, all future requests will use the updated value.
  *
- * @see cache()
+ * @see \Drupal::cache()
  * @see \Drupal\Core\Cache\DatabaseBackend
  */
 interface CacheBackendInterface {
diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php b/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php
index 22b54a3..17fd274 100644
--- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php
+++ b/core/lib/Drupal/Core/Entity/FieldableEntityStorageControllerBase.php
@@ -134,7 +134,7 @@ protected function loadFieldItems(array $entities) {
       foreach ($entities as $id => $entity) {
         $cids[] = "field:{$this->entityTypeId}:$id";
       }
-      $cache = cache('field')->getMultiple($cids);
+      $cache = \Drupal::cache('field')->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) {
@@ -183,7 +183,7 @@ protected function loadFieldItems(array $entities) {
             }
           }
           $cid = "field:{$this->entityTypeId}:$id";
-          cache('field')->set($cid, $data);
+          \Drupal::cache('field')->set($cid, $data);
         }
       }
     }
@@ -207,7 +207,7 @@ protected function saveFieldItems(EntityInterface $entity, $update = TRUE) {
     if ($update) {
       $entity_type = $entity->getEntityType();
       if ($entity_type->isFieldDataCacheable()) {
-        cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id());
+        \Drupal::cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id());
       }
     }
   }
@@ -227,7 +227,7 @@ protected function deleteFieldItems(EntityInterface $entity) {
 
     $entity_type = $entity->getEntityType();
     if ($entity_type->isFieldDataCacheable()) {
-      cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id());
+      \Drupal::cache('field')->delete('field:' . $entity->getEntityTypeId() . ':' . $entity->id());
     }
   }
 
diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
index 24c9084..2bbf3c9 100644
--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
@@ -36,7 +36,7 @@ class TwigEnvironment extends \Twig_Environment {
    */
   public function __construct(\Twig_LoaderInterface $loader = NULL, $options = array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
     // @todo Pass as arguments from the DIC.
-    $this->cache_object = cache();
+    $this->cache_object = \Drupal::cache();
 
     // Set twig path namespace for themes and modules.
     $namespaces = $module_handler->getModuleList();
diff --git a/core/lib/Drupal/Core/Utility/CacheArray.php b/core/lib/Drupal/Core/Utility/CacheArray.php
index 2323756..89f54e4 100644
--- a/core/lib/Drupal/Core/Utility/CacheArray.php
+++ b/core/lib/Drupal/Core/Utility/CacheArray.php
@@ -68,21 +68,21 @@
 abstract class CacheArray implements \ArrayAccess {
 
   /**
-   * A cid to pass to cache()->set() and cache()->get().
+   * A cid to pass to \Drupal::cache()->set() and \Drupal::cache()->get().
    *
    * @var string
    */
   protected $cid;
 
   /**
-   * A tags array to pass to cache()->set().
+   * A tags array to pass to \Drupal::cache()->set().
    *
    * @var array
    */
   protected $tags;
 
   /**
-   * A bin to pass to cache()->set() and cache()->get().
+   * A bin to pass to \Drupal::cache()->set() and \Drupal::cache()->get().
    *
    * @var string
    */
@@ -117,7 +117,7 @@ public function __construct($cid, $bin, $tags = array()) {
     $this->bin = $bin;
     $this->tags = $tags;
 
-    if ($cached = cache($bin)->get($this->cid)) {
+    if ($cached = \Drupal::cache($bin)->get($this->cid)) {
      $this->storage = $cached->data;
     }
   }
@@ -202,10 +202,10 @@ protected function set($data, $lock = TRUE) {
     // To implement locking for cache misses, override __construct().
     $lock_name = $this->cid . ':' . $this->bin;
     if (!$lock || lock()->acquire($lock_name)) {
-      if ($cached = cache($this->bin)->get($this->cid)) {
+      if ($cached = \Drupal::cache($this->bin)->get($this->cid)) {
         $data = $cached->data + $data;
       }
-      cache($this->bin)->set($this->cid, $data, Cache::PERMANENT, $this->tags);
+      \Drupal::cache($this->bin)->set($this->cid, $data, Cache::PERMANENT, $this->tags);
       if ($lock) {
         lock()->release($lock_name);
       }
@@ -218,7 +218,7 @@ protected function set($data, $lock = TRUE) {
   public function clear() {
     $this->storage = array();
     $this->keysToPersist = array();
-    cache($this->bin)->delete($this->cid);
+    \Drupal::cache($this->bin)->delete($this->cid);
   }
 
   /**
diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockListController.php
index b210574..89a6191 100644
--- a/core/modules/block/lib/Drupal/block/BlockListController.php
+++ b/core/modules/block/lib/Drupal/block/BlockListController.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Plugin\PluginManagerInterface;
 use Drupal\Component\Utility\Json;
 use Drupal\Component\Utility\String;
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\Entity\ConfigEntityListController;
 use Drupal\Core\Entity\EntityControllerInterface;
 use Drupal\Core\Entity\EntityInterface;
@@ -412,7 +413,7 @@ public function submitForm(array &$form, array &$form_state) {
       $entity->save();
     }
     drupal_set_message(t('The block settings have been updated.'));
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
   }
 
 }
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
index 6206dbb..7414efd 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\block\Tests;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -80,7 +81,7 @@ function testCachePerRole() {
     $this->assertText($old_content, 'Block is served from the cache.');
 
     // Clear the cache and verify that the stale data is no longer there.
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
     $this->drupalGet('');
     $this->assertNoText($old_content, 'Block cache clear removes stale cache data.');
     $this->assertText($current_content, 'Fresh block content is displayed after clearing the cache.');
diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php
index 37982ff..077dab7 100644
--- a/core/modules/book/lib/Drupal/book/BookManager.php
+++ b/core/modules/book/lib/Drupal/book/BookManager.php
@@ -562,7 +562,7 @@ public function bookTreeAllData($menu_name, $link = NULL, $max_depth = NULL) {
 
     if (!isset($tree[$cid])) {
       // If the static variable doesn't have the data, check {cache_menu}.
-      $cache = cache('menu')->get($cid);
+      $cache = \Drupal::cache('menu')->get($cid);
       if ($cache && isset($cache->data)) {
         // If the cache entry exists, it contains the parameters for
         // menu_build_tree().
@@ -589,7 +589,7 @@ public function bookTreeAllData($menu_name, $link = NULL, $max_depth = NULL) {
         }
 
         // Cache the tree building parameters using the page-specific cid.
-        cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
+        \Drupal::cache('menu')->set($cid, $tree_parameters, Cache::PERMANENT, array('menu' => $menu_name));
       }
 
       // Build the tree using the parameters; the resulting tree will be cached
@@ -733,7 +733,7 @@ protected function _menu_build_tree($menu_name, array $parameters = array()) {
 
     // If we do not have this tree in the static cache, check {cache_menu}.
     if (!isset($trees[$tree_cid])) {
-      $cache = cache('menu')->get($tree_cid);
+      $cache = \Drupal::cache('menu')->get($tree_cid);
       if ($cache && isset($cache->data)) {
         $trees[$tree_cid] = $cache->data;
       }
@@ -776,7 +776,7 @@ protected function _menu_build_tree($menu_name, array $parameters = array()) {
       $this->bookTreeCollectNodeLinks($data['tree'], $data['node_links']);
 
       // Cache the data, if it is not already in the cache.
-      cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name));
+      \Drupal::cache('menu')->set($tree_cid, $data, Cache::PERMANENT, array('menu' => $menu_name));
       $trees[$tree_cid] = $data;
     }
 
@@ -993,12 +993,12 @@ public function bookMenuSubtreeData($link) {
     $cid = 'links:' . $link['menu_name'] . ':subtree-cid:' . $link['mlid'];
 
     if (!isset($tree[$cid])) {
-      $cache = cache('menu')->get($cid);
+      $cache = \Drupal::cache('menu')->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 = cache('menu')->get($cache->data);
+        $cache = \Drupal::cache('menu')->get($cache->data);
 
         if ($cache && isset($cache->data)) {
           $data = $cache->data;
@@ -1029,11 +1029,11 @@ public function bookMenuSubtreeData($link) {
         $tree_cid = 'links:' . $item['menu_name'] . ':subtree-data:' . hash('sha256', serialize($data));
         // Cache the data, if it is not already in the cache.
 
-        if (!cache('menu')->get($tree_cid)) {
-          cache('menu')->set($tree_cid, $data);
+        if (!\Drupal::cache('menu')->get($tree_cid)) {
+          \Drupal::cache('menu')->set($tree_cid, $data);
         }
         // Cache the cid of the (shared) data using the menu and item-specific cid.
-        cache('menu')->set($cid, $tree_cid);
+        \Drupal::cache('menu')->set($cid, $tree_cid);
       }
       // Check access for the current user to each item in the tree.
       $this->bookTreeCheckAccess($data['tree'], $data['node_links']);
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
index 21db722..3b5e6cb 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
@@ -313,7 +313,7 @@ public function getLangcodes() {
     // be expensive to calculate all the time. The cache is cleared on core
     // upgrades which is the only situation the CKEditor file listing should
     // change.
-    $langcode_cache = cache('ckeditor.languages')->get('langcodes');
+    $langcode_cache = \Drupal::cache('ckeditor.languages')->get('langcodes');
     if (!empty($langcode_cache)) {
       $langcodes = $langcode_cache->data;
     }
@@ -325,7 +325,7 @@ public function getLangcodes() {
         $langcode = $language_file->getBasename('.js');
         $langcodes[$langcode] = $langcode;
       }
-      cache('ckeditor.languages')->set('langcodes', $langcodes);
+      \Drupal::cache('ckeditor.languages')->set('langcodes', $langcodes);
     }
 
     // Get language mapping if available to map to Drupal language codes.
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
index 89fb331..a7b28a7 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\comment\Tests;
 use Drupal\Component\Utility\String;
+use Drupal\Core\Cache\Cache;
 
 /**
  * Tests the Comment module blocks.
@@ -66,7 +67,7 @@ function testRecentCommentBlock() {
     user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
     // drupalCreateNode() does not automatically flush content caches unlike
     // posting a node from a node form.
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
     $this->drupalGet('');
     $this->assertNoText(t('Recent comments'));
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 0c775c8..6bd2c6d 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -289,7 +289,7 @@ function field_modules_uninstalled($modules) {
  * Clears the field info and field data caches.
  */
 function field_cache_clear() {
-  cache('field')->deleteAll();
+  \Drupal::cache('field')->deleteAll();
   field_info_cache_clear();
 }
 
diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php
index b4ce690..9428dc0 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(cache('field')->get($cid), 'Non-cached: no initial cache entry');
+    $this->assertFalse(\Drupal::cache('field')->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(cache('field')->get($cid), 'Non-cached: no cache entry on insert and load');
+    $this->assertFalse(\Drupal::cache('field')->get($cid), 'Non-cached: no cache entry on insert and load');
 
     // Cacheable entity type.
     $entity_type = 'entity_test_cache';
@@ -207,20 +207,20 @@ function testFieldAttachCache() {
 
     // Check that no initial cache entry is present.
     $cid = "field:$entity_type:" . $entity->id();
-    $this->assertFalse(cache('field')->get($cid), 'Cached: no initial cache entry');
+    $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no initial cache entry');
 
     // Save, and check that no cache entry is present.
     $entity = clone($entity_init);
     $entity->{$this->field_name_2} = $values;
     $entity->save();
     $cid = "field:$entity_type:" . $entity->id();
-    $this->assertFalse(cache('field')->get($cid), 'Cached: no cache entry on insert');
 
+    $this->assertFalse(\Drupal::cache('field')->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 = cache('field')->get($cid);
+    $cache = \Drupal::cache('field')->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(cache('field')->get($cid), 'Cached: no cache entry on update');
+    $this->assertFalse(\Drupal::cache('field')->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 = cache('field')->get($cid);
+    $cache = \Drupal::cache('field')->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(cache('field')->get($cid), 'Cached: no cache entry on new revision creation');
+    $this->assertFalse(\Drupal::cache('field')->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 = cache('field')->get($cid);
+    $cache = \Drupal::cache('field')->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(cache('field')->get($cid), 'Cached: no cache entry after delete');
+    $this->assertFalse(\Drupal::cache('field')->get($cid), 'Cached: no cache entry after delete');
   }
 
   /**
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index e9c04d4..c68aa0e 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -421,7 +421,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
   $cache_id = '';
   if ($cache) {
     $cache_id = $format->format . ':' . $langcode . ':' . hash('sha256', $text);
-    if ($cached = cache('filter')->get($cache_id)) {
+    if ($cached = \Drupal::cache('filter')->get($cache_id)) {
       return $cached->data;
     }
   }
@@ -460,7 +460,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
   // automatically flushed when the text format is updated.
   // @see \Drupal\filter\Entity\FilterFormat::save()
   if ($cache) {
-    cache('filter')->set($cache_id, $text, Cache::PERMANENT, array('filter_format' => $format->id()));
+    \Drupal::cache('filter')->set($cache_id, $text, Cache::PERMANENT, array('filter_format' => $format->id()));
   }
 
   return $text;
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
index e10c5ca..248a9dd 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
@@ -154,7 +154,7 @@ function testFilterAdmin() {
     $this->drupalGet('admin/config/content/formats/manage/' . $restricted);
     $this->assertFieldByName('filters[filter_html][settings][allowed_html]', $edit['filters[filter_html][settings][allowed_html]'], 'Allowed HTML tag added.');
 
-    $this->assertTrue(cache('filter')->isEmpty(), 'Cache cleared.');
+    $this->assertTrue(\Drupal::cache('filter')->isEmpty(), 'Cache cleared.');
 
     $elements = $this->xpath('//select[@name=:first]/following::select[@name=:second]', array(
       ':first' => 'filters[' . $first_filter . '][weight]',
diff --git a/core/modules/image/image.api.php b/core/modules/image/image.api.php
index 7678142..8e2d31d 100644
--- a/core/modules/image/image.api.php
+++ b/core/modules/image/image.api.php
@@ -35,7 +35,7 @@ function hook_image_effect_info_alter(&$effects) {
  */
 function hook_image_style_flush($style) {
   // Empty cached data that contains information about the style.
-  cache('mymodule')->deleteAll();
+  \Drupal::cache('mymodule')->deleteAll();
 }
 
  /**
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationUiTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationUiTest.php
index c3fc74e..fa33010 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationUiTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationUiTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\locale\Tests;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\simpletest\WebTestBase;
 use Drupal\Core\Language\Language;
 use Drupal\Component\Utility\String;
@@ -261,7 +262,7 @@ function testJavaScriptTranslation() {
     // Test JavaScript translation rebuilding.
     file_unmanaged_delete($js_file);
     $this->assertTrue($result = !file_exists($js_file), String::format('JavaScript file deleted: %file', array('%file' => $result ? $js_file : 'found')));
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
     _locale_rebuild_js($langcode);
     $this->assertTrue($result = file_exists($js_file), String::format('JavaScript file rebuilt: %file', array('%file' => $result ? $js_file : 'not found')));
   }
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 8386be5..d960f7f 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -266,7 +266,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.
-  cache('page')->deleteAll();
+  \Drupal::cache('page')->deleteAll();
   // Force JavaScript translation file re-creation for the new language.
   _locale_invalidate_js($language->id);
 }
@@ -277,7 +277,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.
-  cache('page')->deleteAll();
+  \Drupal::cache('page')->deleteAll();
   // Force JavaScript translation file re-creation for the modified language.
   _locale_invalidate_js($language->id);
 }
@@ -298,11 +298,11 @@ function locale_language_delete($language) {
 
   // Changing the language settings impacts the interface:
   _locale_invalidate_js($language->id);
-  cache('page')->deleteAll();
+  \Drupal::cache('page')->deleteAll();
 
   // Clear locale translation caches.
   locale_translation_status_delete_languages(array($language->id));
-  cache()->delete('locale:' . $language->id);
+  \Drupal::cache()->delete('locale:' . $language->id);
 }
 
 /**
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index 61767bd..7fefa18 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -8,6 +8,7 @@
 namespace Drupal\node;
 
 use Drupal\Component\Utility\NestedArray;
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Entity\ContentEntityFormController;
 use Drupal\Core\Language\Language;
@@ -483,7 +484,7 @@ public function save(array $form, array &$form_state) {
     }
 
     // Clear the page and block caches.
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
   }
 
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
index 49fb5d9..c68789c 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\node\Tests;
 
+use Drupal\Core\Cache\Cache;
+
 /**
  * Functional tests for the node module blocks.
  */
@@ -113,7 +115,7 @@ public function testRecentNodeBlock() {
     $node4 = $this->drupalCreateNode($default_settings);
     // drupalCreateNode() does not automatically flush content caches unlike
     // posting a node from a node form.
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
 
     // Test that all four nodes are shown.
     $this->drupalGet('');
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 84612af..52376fb 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -337,7 +337,7 @@ function node_type_get_types() {
  */
 function node_type_get_names() {
   $cid = 'node_type:names:' . language(Language::TYPE_INTERFACE)->id;
-  if ($cache = cache()->get($cid)) {
+  if ($cache = \Drupal::cache()->get($cid)) {
     return $cache->data;
   }
   // Not using node_type_get_types() or entity_load_multiple() here, to allow
@@ -349,7 +349,7 @@ function node_type_get_names() {
     $config = \Drupal::config($config_name);
     $names[$config->get('type')] = $config->get('name');
   }
-  cache()->set($cid, $names, Cache::PERMANENT, array(
+  \Drupal::cache()->set($cid, $names, Cache::PERMANENT, array(
     'node_type' => array_keys($names),
     'node_types' => TRUE,
   ));
@@ -1755,7 +1755,7 @@ function node_access_rebuild($batch_mode = FALSE) {
   if (!isset($batch)) {
     drupal_set_message(t('Content permissions have been rebuilt.'));
     node_access_needs_rebuild(FALSE);
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
   }
 }
 
@@ -1819,7 +1819,7 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) {
   else {
     drupal_set_message(t('The content access permissions have not been properly rebuilt.'), 'error');
   }
-  cache_invalidate_tags(array('content' => TRUE));
+  Cache::invalidateTags(array('content' => TRUE));
 }
 
 /**
diff --git a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
index 184c9d9..e97101d 100644
--- a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
+++ b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
@@ -49,21 +49,21 @@ function testPathCache() {
     $this->drupalPostForm('admin/config/search/path/add', $edit, t('Save'));
 
     // Check the path alias whitelist cache.
-    $whitelist = cache()->get('path_alias_whitelist');
+    $whitelist = \Drupal::cache()->get('path_alias_whitelist');
     $this->assertTrue($whitelist->data['node']);
     $this->assertFalse($whitelist->data['admin']);
 
     // Visit the system path for the node and confirm a cache entry is
     // created.
-    cache('path')->deleteAll();
+    \Drupal::cache('path')->deleteAll();
     // Make sure the path is not converted to the alias.
     $this->drupalGet($edit['source'], array('alias' => TRUE));
-    $this->assertTrue(cache('path')->get($edit['source']), 'Cache entry was created.');
+    $this->assertTrue(\Drupal::cache('path')->get($edit['source']), 'Cache entry was created.');
 
     // Visit the alias for the node and confirm a cache entry is created.
-    cache('path')->deleteAll();
+    \Drupal::cache('path')->deleteAll();
     $this->drupalGet($edit['alias']);
-    $this->assertTrue(cache('path')->get($edit['source']), 'Cache entry was created.');
+    $this->assertTrue(\Drupal::cache('path')->get($edit['source']), 'Cache entry was created.');
   }
 
   /**
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 3571da9..d68dd4e 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -452,7 +452,7 @@ function simpletest_test_get_all($module = NULL) {
 
     // Load test information from cache if available, otherwise retrieve the
     // information from each tests getInfo() method.
-    if ($cache = cache()->get($cid)) {
+    if ($cache = \Drupal::cache()->get($cid)) {
       $groups = $cache->data;
     }
     else {
@@ -532,7 +532,7 @@ function simpletest_test_get_all($module = NULL) {
 
       // Allow modules extending core tests to disable originals.
       drupal_alter('simpletest', $groups);
-      cache()->set($cid, $groups);
+      \Drupal::cache()->set($cid, $groups);
     }
   }
   return $all_groups[$cid];
@@ -611,8 +611,8 @@ function simpletest_clean_environment() {
   }
 
   // Detect test classes that have been added, renamed or deleted.
-  cache()->delete('simpletest');
-  cache()->delete('simpletest_phpunit');
+  \Drupal::cache()->delete('simpletest');
+  \Drupal::cache()->delete('simpletest_phpunit');
 }
 
 /**
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 e2c552b..bc2843c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php
@@ -35,7 +35,7 @@ protected function checkCacheExists($cid, $var, $bin = NULL) {
       $bin = $this->default_bin;
     }
 
-    $cached = cache($bin)->get($cid);
+    $cached = \Drupal::cache($bin)->get($cid);
 
     return isset($cached->data) && $cached->data == $var;
   }
@@ -84,7 +84,7 @@ function assertCacheRemoved($message, $cid = NULL, $bin = NULL) {
       $cid = $this->default_cid;
     }
 
-    $cached = cache($bin)->get($cid);
+    $cached = \Drupal::cache($bin)->get($cid);
     $this->assertFalse($cached, $message);
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
index 46cf5c3..7ad7312 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
@@ -493,7 +493,7 @@ function testDrupalRenderPostRenderCache() {
 
     // GET request: validate cached data.
     $element = array('#cache' => array('cid' => 'post_render_cache_test_GET'));
-    $cached_element = cache()->get(drupal_render_cid_create($element))->data;
+    $cached_element = \Drupal::cache()->get(drupal_render_cid_create($element))->data;
     $expected_element = array(
       '#markup' => '<p>#cache enabled, GET</p>',
       '#attached' => $test_element['#attached'],
@@ -534,7 +534,7 @@ function testDrupalRenderPostRenderCache() {
 
     // POST request: Ensure no data was cached.
     $element = array('#cache' => array('cid' => 'post_render_cache_test_POST'));
-    $cached_element = cache()->get(drupal_render_cid_create($element));
+    $cached_element = \Drupal::cache()->get(drupal_render_cid_create($element));
     $this->assertFalse($cached_element, 'No data is cached because this is a POST request.');
 
     // Restore the previous request method.
@@ -597,7 +597,7 @@ function testDrupalRenderChildrenPostRenderCache() {
 
     // GET request: validate cached data.
     $element = array('#cache' => $element['#cache']);
-    $cached_element = cache()->get(drupal_render_cid_create($element))->data;
+    $cached_element = \Drupal::cache()->get(drupal_render_cid_create($element))->data;
     $expected_element = array(
       '#attached' => array(
         'js' => array(
@@ -679,8 +679,8 @@ function testDrupalRenderChildrenPostRenderCache() {
     $element = $test_element;
     $element['#cache']['keys'] = array('simpletest', 'drupal_render', 'children_post_render_cache', 'nested_cache_parent');
     $element['child']['#cache']['keys'] = array('simpletest', 'drupal_render', 'children_post_render_cache', 'nested_cache_child');
-    $cached_parent_element = cache()->get(drupal_render_cid_create($element))->data;
-    $cached_child_element = cache()->get(drupal_render_cid_create($element['child']))->data;
+    $cached_parent_element = \Drupal::cache()->get(drupal_render_cid_create($element))->data;
+    $cached_child_element = \Drupal::cache()->get(drupal_render_cid_create($element['child']))->data;
     $expected_parent_element = array(
       '#attached' => array(
         'js' => array(
@@ -805,7 +805,7 @@ function testDrupalRenderRenderCachePlaceholder() {
 
     // GET request: validate cached data.
     $element = array('#cache' => array('cid' => 'render_cache_placeholder_test_GET'));
-    $cached_element = cache()->get(drupal_render_cid_create($element))->data;
+    $cached_element = \Drupal::cache()->get(drupal_render_cid_create($element))->data;
     // Parse unique token out of the markup.
     $dom = Html::load($cached_element['#markup']);
     $xpath = new \DOMXPath($dom);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
index 98a1007..08b9a90 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
@@ -85,17 +85,17 @@ protected function assertModuleList(Array $expected_values, $condition) {
    */
   function testModuleImplements() {
     // Clear the cache.
-    cache('bootstrap')->delete('module_implements');
-    $this->assertFalse(cache('bootstrap')->get('module_implements'), 'The module implements cache is empty.');
+    \Drupal::cache('bootstrap')->delete('module_implements');
+    $this->assertFalse(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is empty.');
     $this->drupalGet('');
-    $this->assertTrue(cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
+    $this->assertTrue(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
 
     // Test again with an authenticated user.
     $this->user = $this->drupalCreateUser();
     $this->drupalLogin($this->user);
-    cache('bootstrap')->delete('module_implements');
+    \Drupal::cache('bootstrap')->delete('module_implements');
     $this->drupalGet('');
-    $this->assertTrue(cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
+    $this->assertTrue(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
 
     // Prime ModuleHandler's hook implementation cache by invoking a random hook
     // name. The subsequent \Drupal\Core\Extension\ModuleHandler::install()
diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorLanguageTest.php
index 2e734ef..43d8532 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorLanguageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorLanguageTest.php
@@ -98,7 +98,7 @@ public function testCacheDecoratorLanguage() {
     // Manually check that the expected cache keys are present.
     $languages[] = 'en';
     foreach ($languages as $langcode) {
-      $cache = cache()->get('mock_block:' . $langcode);
+      $cache = \Drupal::cache()->get('mock_block:' . $langcode);
       $this->assertEqual($cache->cid, 'mock_block:' . $langcode, format_string('The !cache cache exists.', array('!cache' => 'mock_block:' . $langcode)));
       $this->assertEqual($cache->expire, 1542646800, format_string('The cache expiration was properly set.'));
     }
@@ -106,7 +106,7 @@ public function testCacheDecoratorLanguage() {
     $manager = new CachedMockBlockManager();
     $manager->clearCachedDefinitions();
     foreach ($languages as $langcode) {
-      $cache = cache()->get('mock_block:' . $langcode);
+      $cache = \Drupal::cache()->get('mock_block:' . $langcode);
       $this->assertFalse($cache, format_string('The !cache cache was properly cleared through the cache::deleteTags() method.', array('!cache' => 'mock_block:' . $langcode)));
     }
     // Change the translations for the german language and recheck strings.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorTest.php
index b305d28..532fea8 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorTest.php
@@ -83,7 +83,7 @@ public function setUp() {
    * that test the basic discovery behavior.
    */
   public function testCachedDefinitions() {
-    $cache = cache($this->cacheBin);
+    $cache = \Drupal::cache($this->cacheBin);
 
     // Check that nothing is cached initially.
     $cached = $cache->get($this->cacheKey);
@@ -111,7 +111,7 @@ public function testCachedDefinitions() {
    * Tests CacheDecorator::clearCachedDefinitions().
    */
   public function testClearCachedDefinitions() {
-    $cache = cache($this->cacheBin);
+    $cache = \Drupal::cache($this->cacheBin);
 
     // Populate the caches by collecting definitions once.
     $this->discovery->getDefinitions();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
index 3e4d6af..ac02c07 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
@@ -44,7 +44,7 @@ function testRaceCondition() {
     $lock_backend = \Drupal::lock();
     $registry = new ThemeRegistry($cid, $cache, $lock_backend, array('theme_registry' => TRUE), $this->container->get('module_handler')->isLoaded());
 
-    $this->assertTrue(cache()->get($cid), 'Cache entry was created.');
+    $this->assertTrue(\Drupal::cache()->get($cid), 'Cache entry was created.');
 
     // Trigger a cache miss for an offset.
     $this->assertTrue($registry->get('theme_test_template_test'), 'Offset was returned correctly from the theme registry.');
@@ -52,12 +52,12 @@ function testRaceCondition() {
     // the cache entry when it is destroyed, usually at the end of the request.
     // Before that happens, manually delete the cache entry we created earlier
     // so that the new entry is written from scratch.
-    cache()->delete($cid);
+    \Drupal::cache()->delete($cid);
 
     // Destroy the class so that it triggers a cache write for the offset.
     $registry->destruct();
 
-    $this->assertTrue(cache()->get($cid), 'Cache entry was created.');
+    $this->assertTrue(\Drupal::cache()->get($cid), 'Cache entry was created.');
 
     // Create a new instance of the class. Confirm that both the offset
     // requested previously, and one that has not yet been requested are both
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php
index a60f140..e98c36f 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\taxonomy;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\Entity\ConfigStorageController;
 
 /**
@@ -20,7 +21,7 @@ class VocabularyStorageController extends ConfigStorageController implements Voc
   public function resetCache(array $ids = NULL) {
     drupal_static_reset('taxonomy_vocabulary_get_names');
     parent::resetCache($ids);
-    cache_invalidate_tags(array('content' => TRUE));
+    Cache::invalidateTags(array('content' => TRUE));
     entity_info_cache_clear();
   }
 
diff --git a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php
index 8cbff60..f325b85 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 = cache('field')->get("field:$entity_type:" . $entity->id());
+    $cache = \Drupal::cache('field')->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() {
         ),
       ),
     );
-    cache('field')->set("field:$entity_type:" . $entity->id(), $data);
+    \Drupal::cache('field')->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/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index d91527b..159aabe 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -575,7 +575,7 @@ function toolbar_library_info() {
 function _toolbar_get_subtrees_hash() {
   $uid = \Drupal::currentUser()->id();
   $cid = _toolbar_get_user_cid($uid);
-  if ($cache = cache('toolbar')->get($cid)) {
+  if ($cache = \Drupal::cache('toolbar')->get($cid)) {
     $hash = $cache->data;
   }
   else {
@@ -585,7 +585,7 @@ function _toolbar_get_subtrees_hash() {
     // caches later, based on the user's ID regardless of language.
     // Clear the cache when the 'locale' tag is deleted. This ensures a fresh
     // subtrees rendering when string translations are made.
-    cache('toolbar')->set($cid, $hash, Cache::PERMANENT, array('user' => array($uid), 'locale' => TRUE,));
+    \Drupal::cache('toolbar')->set($cid, $hash, Cache::PERMANENT, array('user' => array($uid), 'locale' => TRUE,));
   }
   return $hash;
 }
@@ -647,7 +647,7 @@ function _toolbar_get_user_cid($uid) {
  *   (optional) The user ID whose toolbar cache entry to clear.
  */
 function _toolbar_clear_user_cache($uid = NULL) {
-  $cache = cache('toolbar');
+  $cache = \Drupal::cache('toolbar');
   if (!$cache->isEmpty()) {
     // Clear by the 'user' tag in order to delete all caches, in any language,
     // associated with this user.
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 15d232d5..5f0ca76 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -1,6 +1,7 @@
 <?php
 
 use Drupal\Component\Utility\Crypt;
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 use \Drupal\Core\Entity\Display\EntityViewDisplayInterface;
@@ -1234,7 +1235,7 @@ function _user_cancel($edit, $account, $method) {
   }
 
   // Clear the cache for anonymous users.
-  cache_invalidate_tags(array('content' => TRUE));
+  Cache::invalidateTags(array('content' => TRUE));
 }
 
 /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
index 3a1597d..4355a61 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
@@ -170,7 +170,7 @@ protected function getTemporaryView() {
    */
   public function submitOptionsForm(&$form, &$form_state) {
     $cid = 'views_relationship_groupwise_max:' . $this->view->storage->id() . ':' . $this->view->current_display . ':' . $this->options['id'];
-    cache('views_results')->delete($cid);
+    \Drupal::cache('views_results')->delete($cid);
   }
 
   /**
@@ -357,13 +357,13 @@ public function query() {
     else {
       // Get the stored subquery SQL string.
       $cid = 'views_relationship_groupwise_max:' . $this->view->storage->id() . ':' . $this->view->current_display . ':' . $this->options['id'];
-      $cache = cache('views_results')->get($cid);
+      $cache = \Drupal::cache('views_results')->get($cid);
       if (isset($cache->data)) {
         $def['left_query'] = $cache->data;
       }
       else {
         $def['left_query'] = $this->leftQuery($this->options);
-        cache('views_results')->set($cid, $def['left_query']);
+        \Drupal::cache('views_results')->set($cid, $def['left_query']);
       }
     }
 
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 6d5cca9..98ef2b0 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -537,24 +537,24 @@ 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(FieldInstanceInterface $field_instance) {
-  cache('views_info')->deleteAll();
-  cache('views_results')->deleteAll();
+  \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(FieldInstanceInterface $field_instance) {
-  cache('views_info')->deleteAll();
-  cache('views_results')->deleteAll();
+  \Drupal::cache('views_info')->deleteAll();
+  \Drupal::cache('views_results')->deleteAll();
 }
 
 /**
  * Implements hook_ENTITY_TYPE_delete() for 'field_instance_config'.
  */
 function views_field_instance_config_delete(FieldInstanceInterface $field_instance) {
-  cache('views_info')->deleteAll();
-  cache('views_results')->deleteAll();
+  \Drupal::cache('views_info')->deleteAll();
+  \Drupal::cache('views_results')->deleteAll();
 }
 
 /**
@@ -562,7 +562,7 @@ function views_field_instance_config_delete(FieldInstanceInterface $field_instan
  */
 function views_invalidate_cache() {
   // Clear the views cache.
-  cache('views_info')->deleteAll();
+  \Drupal::cache('views_info')->deleteAll();
 
   // Clear the page and block cache.
   Cache::deleteTags(array('content' => TRUE));
diff --git a/core/update.php b/core/update.php
index 6491afc..12ee78f 100644
--- a/core/update.php
+++ b/core/update.php
@@ -52,7 +52,7 @@
  */
 function update_selection_page() {
   // Make sure there is no stale theme registry.
-  cache()->deleteAll();
+  \Drupal::cache()->deleteAll();
 
   drupal_set_title('Drupal database update');
   $elements = \Drupal::formBuilder()->getForm('Drupal\Core\Update\Form\UpdateScriptSelectionForm');
