diff --git a/core/includes/common.inc b/core/includes/common.inc
index 689d136..e472afb 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -7202,8 +7202,8 @@ function drupal_implode_tags($tags) {
  *
  * At times, it is necessary to re-initialize the entire system to account for
  * changed or new code. This function:
- * - Clears all persistent caches (invoking hook_cache_flush()), which always
- *   includes:
+ * - Clears all persistent caches (invoking hook_cache_flush_bins()), which
+ *   always includes:
  *   - The bootstrap cache bin containing base system, module system, and theme
  *     system information.
  *   - The common 'cache' cache bin containing arbitrary caches.
@@ -7229,7 +7229,7 @@ function drupal_implode_tags($tags) {
  * defined in code.
  *
  * All modules need to ensure that all of their caches are flushed when
- * hook_cache_flush() is invoked; any previously known information must no
+ * hook_cache_flush_bins() is invoked; any previously known information must no
  * longer exist. All following hook_rebuild() operations must be based on fresh
  * and current system data. All modules must be able to rely on this contract.
  *
@@ -7253,11 +7253,7 @@ function drupal_implode_tags($tags) {
  */
 function drupal_flush_all_caches() {
   // Flush all persistent caches.
-  // This is executed based on old/previously known information, which is
-  // sufficient, since new extensions cannot have any primed caches yet.
-  foreach (module_invoke_all('cache_flush') as $bin) {
-    cache($bin)->flush();
-  }
+  drupal_flush_all_persistent_caches();
 
   // Flush asset file caches.
   drupal_clear_css_cache();
@@ -7311,6 +7307,24 @@ function drupal_flush_all_caches() {
 }
 
 /**
+ * Helper function to clear all persistent caches including cache bins and
+ * cached files.
+ */
+function drupal_flush_all_persistent_caches() {
+  // This is executed based on old/previously known information, which is
+  // sufficient, since new extensions cannot have any primed caches yet.
+  $cache_bins = module_invoke_all('cache_flush_bins');
+  foreach ($cache_bins as $bin) {
+    cache($bin)->flush();
+  }
+  $cache_files = module_invoke_all('cache_flush_files');
+  foreach ($cache_files as $file) {
+    file_delete($file);
+  }
+  module_invoke_all('cache_flush_execute', $cache_tables, $cache_files);
+}
+
+/**
  * Changes the dummy query string added to all CSS and JavaScript files.
  *
  * Changing the dummy query string appended to CSS and JavaScript files forces
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 50bae76..ded4071 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -948,9 +948,9 @@ function _block_get_renderable_block($element) {
 }
 
 /**
- * Implements hook_cache_flush().
+ * Implements hook_cache_flush_bins().
  */
-function block_cache_flush() {
+function block_cache_flush_bins() {
   return array('block');
 }
 
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index ce2e214..7231041 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -412,9 +412,9 @@ function field_language_fallback(&$field_langcodes, $entity, $langcode) {
 }
 
 /**
- * Implements hook_cache_flush().
+ * Implements hook_cache_flush_bins().
  */
-function field_cache_flush() {
+function field_cache_flush_bins() {
   // Request a flush of our cache table.
   return array('field');
 }
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 12428fe..f11a0d6 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2015,7 +2015,7 @@ function hook_mail($key, &$message, $params) {
 }
 
 /**
- * Flush all persistent and static caches.
+ * Add a list of cache bins to be cleared.
  *
  * This hook asks your module to clear all of its persistent (database) and
  * static caches, in order to ensure a clean environment for subsequently
@@ -2037,7 +2037,7 @@ function hook_mail($key, &$message, $params) {
  * @see drupal_flush_all_caches()
  * @see hook_rebuild()
  */
-function hook_cache_flush() {
+function hook_cache_flush_bins() {
   return array('example');
 }
 
@@ -2096,6 +2096,42 @@ function hook_modules_preenable($modules) {
 }
 
 /**
+ * Add a list of file objects to be cleared.
+ *
+ * This hook allows your module to add a list of file objects that will be
+ * cleared by the Clear button on the Performance page or whenever
+ * drupal_flush_all_caches is invoked.
+ *
+ * @return
+ *   An array of file objects.
+ *
+ * @see drupal_flush_all_caches()
+ */
+function hook_cache_flush_files() {
+  $file = file_load(1);
+  return array($file);
+}
+
+/**
+ * Perform necessary actions when the cache is cleared.
+ *
+ * This hook allows your module to perform actions when the Clear button on the
+ * Performance page is clicked or whenever drupal_flush_all_caches is invoked.
+ * This hook should be used whenver your module must perform actions other than
+ * clearing cache bins or removing files.
+ *
+ * @param $cache_bins
+ *   An array of cache bins to clear.
+ * @param $cache_files
+ *   An array of cached file objects to delete.
+ */
+function hook_cache_flush_execute($cache_bins, $cache_files) {
+  if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
+    _update_cache_clear();
+  }
+}
+
+/**
  * Perform necessary actions after modules are installed.
  *
  * This function differs from hook_install() in that it gives all other modules
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 75b1fa2..3dfe1c9 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -3334,10 +3334,7 @@ function system_cron() {
     }
   }
 
-  $cache_bins = array_merge(module_invoke_all('cache_flush'), array('form', 'menu'));
-  foreach ($cache_bins as $bin) {
-    cache($bin)->expire();
-  }
+  drupal_flush_all_persistent_caches();
 
   // Cleanup the batch table and the queue for failed batches.
   db_delete('batch')
@@ -3360,9 +3357,9 @@ function system_cron() {
 }
 
 /**
- * Implements hook_cache_flush().
+ * Implements hook_cache_flush_bins().
  */
-function system_cache_flush() {
+function system_cache_flush_bins() {
   // Do NOT flush the 'form' cache bin to retain in-progress form submissions.
   return array('bootstrap', 'cache', 'page', 'path');
 }
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 4e6a474..21eb636 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -864,7 +864,7 @@ function _update_cache_clear($cid = NULL, $wildcard = FALSE) {
 }
 
 /**
- * Implements hook_cache_flush().
+ * Implements hook_cache_flush_execute().
  *
  * Called from update.php (among others) to flush the caches. Since we're
  * running update.php, we are likely to install a new version of something, in
@@ -877,11 +877,10 @@ function _update_cache_clear($cid = NULL, $wildcard = FALSE) {
  * the site is in MAINTENANCE_MODE == 'update' (which indicates update.php is
  * running, not update module... alas for overloaded names).
  */
-function update_cache_flush() {
+function update_cache_flush_execute($cache_bins, $cache_files) {
   if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
     _update_cache_clear();
   }
-  return array();
 }
 
 /**
