diff --git a/includes/form.inc b/includes/form.inc
index 442016a..cfbea38 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -472,12 +472,12 @@ function drupal_rebuild_form($form_id, &$form_state, $old_form = NULL) {
  * Fetch a form from cache.
  */
 function form_get_cache($form_build_id, &$form_state) {
-  if ($cached = cache_get('form_' . $form_build_id, 'cache_form')) {
+  if ($cached = cache('form')->get('form_' . $form_build_id)) {
     $form = $cached->data;
 
     global $user;
     if ((isset($form['#cache_token']) && drupal_valid_token($form['#cache_token'])) || (!isset($form['#cache_token']) && !$user->uid)) {
-      if ($cached = cache_get('form_state_' . $form_build_id, 'cache_form')) {
+      if ($cached = cache('form')->get('form_state_' . $form_build_id)) {
         // Re-populate $form_state for subsequent rebuilds.
         $form_state = $cached->data + $form_state;
 
@@ -511,12 +511,12 @@ function form_set_cache($form_build_id, $form, $form_state) {
     if ($GLOBALS['user']->uid) {
       $form['#cache_token'] = drupal_get_token();
     }
-    cache_set('form_' . $form_build_id, $form, 'cache_form', REQUEST_TIME + $expire);
+    cache('form')->set('form_' . $form_build_id, $form, REQUEST_TIME + $expire);
   }
 
   // Cache form state.
   if ($data = array_diff_key($form_state, array_flip(form_state_keys_no_cache()))) {
-    cache_set('form_state_' . $form_build_id, $data, 'cache_form', REQUEST_TIME + $expire);
+    cache('form')->set('form_state_' . $form_build_id, $data, REQUEST_TIME + $expire);
   }
 }
 
@@ -835,8 +835,8 @@ function drupal_process_form($form_id, &$form, &$form_state) {
       // here, as we've finished with them. The in-memory copies are still
       // here, though.
       if (!variable_get('cache', 0) && !empty($form_state['values']['form_build_id'])) {
-        cache_clear_all('form_' . $form_state['values']['form_build_id'], 'cache_form');
-        cache_clear_all('form_state_' . $form_state['values']['form_build_id'], 'cache_form');
+        cache('form')->delete('form_' . $form_state['values']['form_build_id']);
+        cache('form')->delete('form_state_' . $form_state['values']['form_build_id']);
       }
 
       // If batches were set in the submit handlers, we process them now,
diff --git a/includes/gettext.inc b/includes/gettext.inc
index 39a6fbe..fa9952b 100644
--- a/includes/gettext.inc
+++ b/includes/gettext.inc
@@ -53,7 +53,7 @@ function _locale_import_po($file, $langcode, $mode) {
 
   // Clear cache and force refresh of JavaScript translations.
   _locale_invalidate_js($langcode);
-  cache_clear_all('locale:', 'cache', TRUE);
+  cache()->deletePrefix('locale:');
 
   // Rebuild the menu, strings may have changed.
   menu_rebuild();
diff --git a/includes/menu.inc b/includes/menu.inc
index 3e775db..bac4cd2 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -441,14 +441,14 @@ function menu_get_item($path = NULL, $router_item = NULL) {
     // Since there is no limit to the length of $path, use a hash to keep it
     // short yet unique.
     $cid = 'menu_item:' . hash('sha256', $path);
-    if ($cached = cache_get($cid, 'cache_menu')) {
+    if ($cached = cache('menu')->get($cid)) {
       $router_item = $cached->data;
     }
     else {
       $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
       $ancestors = menu_get_ancestors($parts);
       $router_item = db_query_range('SELECT * FROM {menu_router} WHERE path IN (:ancestors) ORDER BY fit DESC', 0, 1, array(':ancestors' => $ancestors))->fetchAssoc();
-      cache_set($cid, $router_item, 'cache_menu');
+      cache('menu')->set($cid, $router_item);
     }
     if ($router_item) {
       // Allow modules to alter the router item before it is translated and
@@ -1095,7 +1095,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_get($cid, 'cache_menu');
+    $cache = cache('menu')->get($cid);
     if ($cache && isset($cache->data)) {
       // If the cache entry exists, it contains the parameters for
       // menu_build_tree().
@@ -1122,7 +1122,7 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) {
       }
 
       // Cache the tree building parameters using the page-specific cid.
-      cache_set($cid, $tree_parameters, 'cache_menu');
+      cache('menu')->set($cid, $tree_parameters);
     }
 
     // Build the tree using the parameters; the resulting tree will be cached
@@ -1179,7 +1179,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_get($cid, 'cache_menu');
+      $cache = cache('menu')->get($cid);
       if ($cache && isset($cache->data)) {
         // If the cache entry exists, it contains the parameters for
         // menu_build_tree().
@@ -1251,7 +1251,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_set($cid, $tree_parameters, 'cache_menu');
+        cache('menu')->set($cid, $tree_parameters);
       }
 
       // Build the tree using the parameters; the resulting tree will be cached
@@ -1317,7 +1317,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_get($tree_cid, 'cache_menu');
+    $cache = cache('menu')->get($tree_cid);
     if ($cache && isset($cache->data)) {
       $trees[$tree_cid] = $cache->data;
     }
@@ -1378,7 +1378,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_set($tree_cid, $data, 'cache_menu');
+    cache('menu')->set($tree_cid, $data);
     $trees[$tree_cid] = $data;
   }
 
@@ -2529,7 +2529,7 @@ function menu_cache_clear($menu_name = 'navigation') {
  * might have been made to the router items or menu links.
  */
 function menu_cache_clear_all() {
-  cache_clear_all('*', 'cache_menu', TRUE);
+  cache('menu')->flush();
   menu_reset_static_cache();
 }
 
diff --git a/includes/module.inc b/includes/module.inc
index 66c77f5..cc3aa8e 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -129,12 +129,12 @@ function system_list($type) {
     if (isset($lists['bootstrap'])) {
       return $lists['bootstrap'];
     }
-    if ($cached = cache_get('bootstrap_modules', 'cache_bootstrap')) {
+    if ($cached = cache('bootstrap')->get('bootstrap_modules')) {
       $bootstrap_list = $cached->data;
     }
     else {
       $bootstrap_list = db_query("SELECT name, filename FROM {system} WHERE status = 1 AND bootstrap = 1 AND type = 'module' ORDER BY weight ASC, name ASC")->fetchAllAssoc('name');
-      cache_set('bootstrap_modules', $bootstrap_list, 'cache_bootstrap');
+      cache('bootstrap')->set('bootstrap_modules', $bootstrap_list);
     }
     // To avoid a separate database lookup for the filepath, prime the
     // drupal_get_filename() static cache for bootstrap modules only.
@@ -148,7 +148,7 @@ function system_list($type) {
   }
   // Otherwise build the list for enabled modules and themes.
   elseif (!isset($lists['module_enabled'])) {
-    if ($cached = cache_get('system_list', 'cache_bootstrap')) {
+    if ($cached = cache('bootstrap')->get('system_list')) {
       $lists = $cached->data;
     }
     else {
@@ -178,7 +178,7 @@ function system_list($type) {
           $lists['filepaths'][] = array('type' => $record->type, 'name' => $record->name, 'filepath' => $record->filename);
         }
       }
-      cache_set('system_list', $lists, 'cache_bootstrap');
+      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.
@@ -197,8 +197,7 @@ function system_list_reset() {
   drupal_static_reset('system_list');
   drupal_static_reset('system_rebuild_module_data');
   drupal_static_reset('list_themes');
-  cache_clear_all('bootstrap_modules', 'cache_bootstrap');
-  cache_clear_all('system_list', 'cache_bootstrap');
+  cache('bootstrap')->deleteMultiple(array('bootstrap_modules', 'system_list'));
 }
 
 /**
@@ -648,16 +647,16 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE) {
   // per request.
   if ($reset) {
     $implementations = array();
-    cache_set('module_implements', array(), 'cache_bootstrap');
+    cache('bootstrap')->set('module_implements', array());
     drupal_static_reset('module_hook_info');
     drupal_static_reset('drupal_alter');
-    cache_clear_all('hook_info', 'cache_bootstrap');
+    cache('bootstrap')->delete('hook_info');
     return;
   }
 
   // Fetch implementations from cache.
   if (empty($implementations)) {
-    $implementations = cache_get('module_implements', 'cache_bootstrap');
+    $implementations = cache('bootstrap')->get('module_implements');
     if ($implementations === FALSE) {
       $implementations = array();
     }
@@ -726,7 +725,7 @@ function module_hook_info() {
 
   if (!isset($hook_info)) {
     $hook_info = array();
-    $cache = cache_get('hook_info', 'cache_bootstrap');
+    $cache = cache('bootstrap')->get('hook_info');
     if ($cache === FALSE) {
       // Rebuild the cache and save it.
       // We can't use module_invoke_all() here or it would cause an infinite
@@ -747,7 +746,7 @@ function module_hook_info() {
           $function($hook_info);
         }
       }
-      cache_set('hook_info', $hook_info, 'cache_bootstrap');
+      cache('bootstrap')->set('hook_info', $hook_info);
     }
     else {
       $hook_info = $cache->data;
@@ -769,7 +768,7 @@ function module_implements_write_cache() {
   // optimized as tightly, and not doing so keeps the cache entry smaller.
   if (isset($implementations['#write_cache']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')) {
     unset($implementations['#write_cache']);
-    cache_set('module_implements', $implementations, 'cache_bootstrap');
+    cache('bootstrap')->set('module_implements', $implementations);
   }
 }
 
diff --git a/includes/path.inc b/includes/path.inc
index db60537..630b34c 100644
--- a/includes/path.inc
+++ b/includes/path.inc
@@ -90,7 +90,7 @@ function drupal_lookup_path($action, $path = '', $path_language = NULL) {
         $cache['map'][$path_language] = array();
         // Load system paths from cache.
         $cid = current_path();
-        if ($cached = cache_get($cid, 'cache_path')) {
+        if ($cached = cache('path')->get($cid)) {
           $cache['system_paths'] = $cached->data;
           // Now fetch the aliases corresponding to these system paths.
           $args = array(
@@ -212,7 +212,7 @@ function drupal_cache_system_paths() {
     if ($paths = current($cache['map'])) {
       $data = array_keys($paths);
       $expire = REQUEST_TIME + (60 * 60 * 24);
-      cache_set($cid, $data, 'cache_path', $expire);
+      cache('path')->set($cid, $data, $expire);
     }
   }
 }
diff --git a/includes/registry.inc b/includes/registry.inc
index 3fb14fb..38bcd16 100644
--- a/includes/registry.inc
+++ b/includes/registry.inc
@@ -83,7 +83,7 @@ function _registry_update() {
 
     $unchanged_resources = array();
     $lookup_cache = array();
-    if ($cache = cache_get('lookup_cache', 'cache_bootstrap')) {
+    if ($cache = cache('bootstrap')->get('lookup_cache')) {
       $lookup_cache = $cache->data;
     }
     foreach ($lookup_cache as $key => $file) {
@@ -105,7 +105,7 @@ function _registry_update() {
   // We have some unchanged resources, warm up the cache - no need to pay
   // for looking them up again.
   if (count($unchanged_resources) > 0) {
-    cache_set('lookup_cache', $unchanged_resources, 'cache_bootstrap');
+    cache('bootstrap')->set('lookup_cache', $unchanged_resources);
   }
 }
 
diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc
index 2419201..c643e40 100644
--- a/modules/field/field.attach.inc
+++ b/modules/field/field.attach.inc
@@ -710,7 +710,7 @@ function field_attach_load($entity_type, $entities, $age = FIELD_LOAD_CURRENT, $
           $data[$instance['field_name']] = $queried_entities[$id]->{$instance['field_name']};
         }
         $cid = "field:$entity_type:$id";
-        cache_set($cid, $data, 'cache_field');
+        cache('field')->set($cid, $data);
       }
     }
   }
@@ -984,7 +984,7 @@ function field_attach_update($entity_type, $entity) {
 
   $entity_info = entity_get_info($entity_type);
   if ($entity_info['field cache']) {
-    cache_clear_all("field:$entity_type:$id", 'cache_field');
+    cache('field')->delete("field:$entity_type:$id");
   }
 }
 
@@ -1021,7 +1021,7 @@ function field_attach_delete($entity_type, $entity) {
 
   $entity_info = entity_get_info($entity_type);
   if ($entity_info['field cache']) {
-    cache_clear_all("field:$entity_type:$id", 'cache_field');
+    cache('field')->delete("field:$entity_type:$id");
   }
 }
 
diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc
index 6b172dd..cc8dac5 100644
--- a/modules/field/field.info.inc
+++ b/modules/field/field.info.inc
@@ -76,12 +76,12 @@ function _field_info_collate_types($reset = FALSE) {
   if ($reset) {
     $info = NULL;
     // Clear all languages.
-    cache_clear_all('field_info_types:', 'cache_field', TRUE);
+    cache('field')->deletePrefix('field_info_types:');
     return;
   }
 
   if (!isset($info)) {
-    if ($cached = cache_get("field_info_types:$langcode", 'cache_field')) {
+    if ($cached = cache('field')->get("field_info_types:$langcode")) {
       $info = $cached->data;
     }
     else {
@@ -149,7 +149,7 @@ function _field_info_collate_types($reset = FALSE) {
       }
       drupal_alter('field_storage_info', $info['storage types']);
 
-      cache_set("field_info_types:$langcode", $info, 'cache_field');
+      cache('field')->set("field_info_types:$langcode", $info);
     }
   }
 
@@ -181,12 +181,12 @@ function _field_info_collate_fields($reset = FALSE) {
 
   if ($reset) {
     $info = NULL;
-    cache_clear_all('field_info_fields', 'cache_field');
+    cache('field')->delete('field_info_fields');
     return;
   }
 
   if (!isset($info)) {
-    if ($cached = cache_get('field_info_fields', 'cache_field')) {
+    if ($cached = cache('field')->get('field_info_fields')) {
       $info = $cached->data;
     }
     else {
@@ -238,7 +238,7 @@ function _field_info_collate_fields($reset = FALSE) {
         }
       }
 
-      cache_set('field_info_fields', $info, 'cache_field');
+      cache('field')->set('field_info_fields', $info);
     }
   }
 
diff --git a/modules/field/field.module b/modules/field/field.module
index 30166bd..9683c02 100644
--- a/modules/field/field.module
+++ b/modules/field/field.module
@@ -772,7 +772,7 @@ function _field_extra_fields_pre_render($elements) {
  * Clear the field info and field data caches.
  */
 function field_cache_clear() {
-  cache_clear_all('*', 'cache_field', TRUE);
+  cache('field')->flush();
   field_info_cache_clear();
 }
 
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 9e14812..a3f787e 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -260,7 +260,7 @@ function filter_format_save($format) {
     $return = SAVED_UPDATED;
 
     // Clear the filter cache whenever a text format is updated.
-    cache_clear_all($format->format . ':', 'cache_filter', TRUE);
+    cache('filter')->deletePrefix($format->format . ':');
   }
 
   filter_formats_reset();
@@ -290,7 +290,7 @@ function filter_format_disable($format) {
 
   // Clear the filter cache whenever a text format is disabled.
   filter_formats_reset();
-  cache_clear_all($format->format . ':', 'cache_filter', TRUE);
+  cache('filter')->deletePrefix($format->format . ':');
 }
 
 /**
@@ -395,7 +395,7 @@ function filter_formats($account = NULL) {
 
   // All available formats are cached for performance.
   if (!isset($formats['all'])) {
-    if ($cache = cache_get("filter_formats:{$language->language}")) {
+    if ($cache = cache()->get("filter_formats:{$language->language}")) {
       $formats['all'] = $cache->data;
     }
     else {
@@ -407,7 +407,7 @@ function filter_formats($account = NULL) {
         ->execute()
         ->fetchAllAssoc('format');
 
-      cache_set("filter_formats:{$language->language}", $formats['all']);
+      cache()->set("filter_formats:{$language->language}", $formats['all']);
     }
   }
 
@@ -430,8 +430,8 @@ function filter_formats($account = NULL) {
  * @see filter_formats()
  */
 function filter_formats_reset() {
-  cache_clear_all('filter_formats', 'cache', TRUE);
-  cache_clear_all('filter_list_format', 'cache', TRUE);
+  cache()->deletePrefix('filter_formats');
+  cache()->deletePrefix('filter_list_format');
   drupal_static_reset('filter_list_format');
   drupal_static_reset('filter_formats');
 }
@@ -657,7 +657,7 @@ function filter_list_format($format_id) {
   $filter_info = filter_get_filters();
 
   if (!isset($filters['all'])) {
-    if ($cache = cache_get('filter_list_format')) {
+    if ($cache = cache()->get('filter_list_format')) {
       $filters['all'] = $cache->data;
     }
     else {
@@ -665,7 +665,7 @@ function filter_list_format($format_id) {
       foreach ($result as $record) {
         $filters['all'][$record->format][$record->name] = $record;
       }
-      cache_set('filter_list_format', $filters['all']);
+      cache()->set('filter_list_format', $filters['all']);
     }
   }
 
@@ -731,7 +731,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_get($cache_id, 'cache_filter')) {
+    if ($cached = cache('filter')->get($cache_id)) {
       return $cached->data;
     }
   }
@@ -765,7 +765,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE)
   // automatically flushed when the text format is updated.
   // @see filter_format_save()
   if ($cache) {
-    cache_set($cache_id, $text, 'cache_filter');
+    cache('filter')->set($cache_id, $text);
   }
 
   return $text;
diff --git a/modules/image/image.api.php b/modules/image/image.api.php
index acb3f9c..52490c3 100644
--- a/modules/image/image.api.php
+++ b/modules/image/image.api.php
@@ -110,7 +110,7 @@ function hook_image_style_delete($style) {
  */
 function hook_image_style_flush($style) {
   // Empty cached data that contains information about the style.
-  cache_clear_all('*', 'cache_mymodule', TRUE);
+  cache('mymodule')->flush();
 }
 
 /**
diff --git a/modules/image/image.module b/modules/image/image.module
index 008a365..1f42073 100644
--- a/modules/image/image.module
+++ b/modules/image/image.module
@@ -492,7 +492,7 @@ function image_styles() {
 
   // Grab from cache or build the array.
   if (!isset($styles)) {
-    if ($cache = cache_get('image_styles', 'cache')) {
+    if ($cache = cache()->get('image_styles')) {
       $styles = $cache->data;
     }
     else {
@@ -534,7 +534,7 @@ function image_styles() {
       }
 
       drupal_alter('image_styles', $styles);
-      cache_set('image_styles', $styles);
+      cache()->set('image_styles', $styles);
     }
   }
 
@@ -827,8 +827,8 @@ function image_style_flush($style) {
   module_invoke_all('image_style_flush', $style);
 
   // Clear image style and effect caches.
-  cache_clear_all('image_styles', 'cache');
-  cache_clear_all('image_effects:', 'cache', TRUE);
+  cache()->delete('image_styles');
+  cache()->deletePrefix('image_effects:');
   drupal_static_reset('image_styles');
   drupal_static_reset('image_effects');
 
@@ -838,9 +838,9 @@ function image_style_flush($style) {
 
   // Clear page caches when flushing.
   if (module_exists('block')) {
-    cache_clear_all('*', 'cache_block', TRUE);
+    cache('block')->flush();
   }
-  cache_clear_all('*', 'cache_page', TRUE);
+  cache('page')->flush();
 }
 
 /**
@@ -952,7 +952,7 @@ function image_effect_definitions() {
   $effects = &drupal_static(__FUNCTION__);
 
   if (!isset($effects)) {
-    if ($cache = cache_get("image_effects:$langcode") && !empty($cache->data)) {
+    if ($cache = cache()->get("image_effects:$langcode") && !empty($cache->data)) {
       $effects = $cache->data;
     }
     else {
@@ -969,7 +969,7 @@ function image_effect_definitions() {
       }
       uasort($effects, '_image_effect_definitions_sort');
       drupal_alter('image_effect_info', $effects);
-      cache_set("image_effects:$langcode", $effects);
+      cache()->set("image_effects:$langcode", $effects);
     }
   }
 
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 2540797..fa58373 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -230,12 +230,12 @@ function menu_load($menu_name) {
 function menu_load_all() {
   $custom_menus = &drupal_static(__FUNCTION__);
   if (!isset($custom_menus)) {
-    if ($cached = cache_get('menu_custom', 'cache_menu')) {
+    if ($cached = cache('menu')->get('menu_custom')) {
       $custom_menus = $cached->data;
     }
     else {
       $custom_menus = db_query('SELECT * FROM {menu_custom}')->fetchAllAssoc('menu_name', PDO::FETCH_ASSOC);
-      cache_set('menu_custom', $custom_menus, 'cache_menu');
+      cache('menu')->set('menu_custom', $custom_menus);
     }
   }
   return $custom_menus;
diff --git a/modules/path/path.test b/modules/path/path.test
index 9e50178..241f532 100644
--- a/modules/path/path.test
+++ b/modules/path/path.test
@@ -37,14 +37,14 @@ class PathTestCase extends DrupalWebTestCase {
 
     // Visit the system path for the node and confirm a cache entry is
     // created.
-    cache_clear_all('*', 'cache_path', TRUE);
+    cache('path')->flush();
     $this->drupalGet($edit['source']);
-    $this->assertTrue(cache_get($edit['source'], 'cache_path'), t('Cache entry was created.'));
+    $this->assertTrue(cache('path')->get($edit['source']), t('Cache entry was created.'));
 
     // Visit the alias for the node and confirm a cache entry is created.
-    cache_clear_all('*', 'cache_path', TRUE);
+    cache('path')->flush();
     $this->drupalGet($edit['alias']);
-    $this->assertTrue(cache_get($edit['source'], 'cache_path'), t('Cache entry was created.'));
+    $this->assertTrue(cache('path')->get($edit['source']), t('Cache entry was created.'));
   }
 
   /**
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module
index ede9ac6..80a6bc5 100644
--- a/modules/simpletest/simpletest.module
+++ b/modules/simpletest/simpletest.module
@@ -311,7 +311,7 @@ function simpletest_test_get_all() {
   if (!$groups) {
     // Load test information from cache if available, otherwise retrieve the
     // information from each tests getInfo() method.
-    if ($cache = cache_get('simpletest', 'cache')) {
+    if ($cache = cache()->get('simpletest')) {
       $groups = $cache->data;
     }
     else {
@@ -347,7 +347,7 @@ function simpletest_test_get_all() {
 
       // Allow modules extending core tests to disable originals.
       drupal_alter('simpletest', $groups);
-      cache_set('simpletest', $groups);
+      cache()->set('simpletest', $groups);
     }
   }
   return $groups;
@@ -421,7 +421,7 @@ function simpletest_clean_environment() {
 
   // Detect test classes that have been added, renamed or deleted.
   registry_rebuild();
-  cache_clear_all('simpletest', 'cache');
+  cache()->delete('simpletest');
 }
 
 /**
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index baac6f7..6824f19 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1734,7 +1734,7 @@ function system_clear_cache_submit($form, &$form_state) {
  * @ingroup forms
  */
 function system_clear_page_cache_submit($form, &$form_state) {
-  cache_clear_all('*', 'cache_page', TRUE);
+  cache('page')->flush();
 }
 
 /**
