Skip to content

Instantly share code, notes, and snippets.

@tiltedlistener
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiltedlistener/5a0ba5a285f5719f339e to your computer and use it in GitHub Desktop.
Save tiltedlistener/5a0ba5a285f5719f339e to your computer and use it in GitHub Desktop.
Possible Drupal index.php that clears caches on each request
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();
drupal_flush_all_caches();
/**
* The intent is to clear the caches so that when multiple people are sharing the same db in dev,
* CSS / Template caching collisions don't occur.
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment