Created
April 26, 2014 06:16
-
-
Save maciekrb/11313066 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
require_once DRUPAL_ROOT. '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
// Change query-strings on css/js files to enforce reload for all users | |
_drupal_flush_css_js(); | |
drupal_clear_css_cache(); | |
drupal_clear_js_cache(); | |
// Ordered so clearing the page cache will always be the last action. | |
$core = array( | |
'cache', 'cache_admin_menu', 'cache_path', 'cache_block', 'cache_field', | |
'cache_filter', 'cache_form', 'cache_bootstrap', 'cache_image', 'cache_l10n_update', | |
'cache_libraries', 'cache_menu', 'cache_path', 'cache_path_breadcrumbs', 'cache_rules', | |
'cache_token', 'cache_update', 'cache_views', 'cache_views_data' | |
); | |
$cache_tables = array_merge(module_invoke_all('flush_caches'), $core); | |
foreach ($cache_tables as $table) { | |
cache_clear_all('*', $table, TRUE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment