
Steps
You can use the administrative interface or Drush to clear the cache. You can also use the rebuild script or Drush to do a more complete cache rebuild.
Using the administrative interface to clear the cache
- In the Manage administrative menu, navigate to Configuration > Development > Performance (admin/config/development/performance). If you cannot access this page in the administrative interface, use one of the other methods to clear or rebuild the cache.
- Click Clear all caches.
- A message saying the cache has been cleared appears at the top of the page.
- If this doesn’t resolve the problem that caused you to want to clear the cache, try a rebuild instead.
Using the rebuild script
-
Open settings.php (/sites/default/settings.php) in any plain text editor. Add this line to the end of the file and save it:
$settings['rebuild_access'] = TRUE;
- Visit http://www.example.com/core/rebuild.php in your browser (where www.example.com is your site’s URL). After a short pause, you should be redirected to the home page of your site, and the cache should be rebuilt.
- Open settings.php (/sites/default/settings.php) in a text editor. Find the line you added with $settings[rebuild_access], remove this line, and save the file.
Using Drush to rebuild or clear the cache
You can use one of two commands:
- Use the command
drush cache:rebuildto clear and rebuild all cached data for a site. After running this command, you will see the output message “Cache rebuild complete.” -
Use the command
drush cache:clearto see a list of individual caches and then choose the specific cache you would like to clear. Running this command should produce output like the following:> drush cache:clear Enter a number to choose which cache to clear. [0] : Cancel [1] : drush [2] : theme-registry [3] : menu [4] : css-js [5] : block [6] : module-list [7] : theme-list [8] : render [9] : views
Choose a cache to clear by entering the number associated with that cache. Press “Enter” to continue.
