Skip to content

Instantly share code, notes, and snippets.

@joshuapowell
Created January 26, 2012 02:17
Show Gist options
  • Save joshuapowell/1680524 to your computer and use it in GitHub Desktop.
Save joshuapowell/1680524 to your computer and use it in GitHub Desktop.
Drupal: Automatically clear all site caches and reset all Views (i.e., views that are coded and saved as individual files)
<?php
/**
* Automated Cache Clearing
*
* For development purpose only, this cannot be enabled on a live
* website or else it will make everyone that uses the site sad.
*/
/* Clear all Drupal core caches */
drupal_flush_all_caches();
/* Clear all Views caches (for file-based views */
views_invalidate_cache();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment