Skip to content

Commit

Permalink
Clear user caches like core/rebuild.php does. (drush-ops#2450)
Browse files Browse the repository at this point in the history
  • Loading branch information
timplunkett authored and mikeker committed Aug 4, 2017
1 parent 237f523 commit 3156712
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commands/core/cache.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ function drush_cache_rebuild() {
if (function_exists('apc_fetch')) {
apc_clear_cache('user');
}
// Clear user cache for all major platforms.
$user_caches = [
'apcu_clear_cache',
'wincache_ucache_clear',
'xcache_clear_cache',
];
array_walk(array_filter($user_caches, 'is_callable'), 'call_user_func');

$autoloader = drush_drupal_load_autoloader(DRUPAL_ROOT);
require_once DRUSH_DRUPAL_CORE . '/includes/utility.inc';
Expand Down

0 comments on commit 3156712

Please sign in to comment.