Created
March 16, 2014 22:45
-
-
Save sun/9590977 to your computer and use it in GitHub Desktop.
D8 cc.php
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 | |
/** | |
* @file | |
* Script to flush all caches in Drupal 8. | |
* | |
* Place this script into your Drupal document root; i.e., /cc.php | |
* and request it in your browser. | |
*/ | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
require_once __DIR__ . '/core/vendor/autoload.php'; | |
require_once __DIR__ . '/core/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
drupal_flush_all_caches(); | |
drupal_set_message(t('Flushed all caches.')); | |
$response = new RedirectResponse($GLOBALS['base_path']); | |
$response->send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment