I know this is a very basic question. Is flush and clear cache the same in Drupal 7? How will I flush cache in DRupal 7? It seems like the only available option for me is clear cache. But I saw a video tutorial which uses flush cache in Drupal 7. What will I do to avail this option?

  • 2
    Flush & Clear are the same – mikeytown2 Nov 10 '14 at 3:44

In this context, the English verbs "flush" and "clear" are equivalent.

However, I've never seen a command named "flush cache" in Drupal 7. Not having seen the video tutorial you mention, it is impossible to tell what was ment. In the standard GUI, the button "Clear all caches" (under Home » Administration » Configuration » Development » Clear cache) is (AFAIK) the only way to do it.

If you have Drush installed, you can do more or less the same thing using the CLI with the following command:

drush cache-clear all

The difference is that the command drush cache-clear all also clear its internal cache, and there may be subtle differences because the drush user and web-server user are different, and may therefore interact different with file permissions to caches in the file system, such as the css registry.

However, Drush also allows you to make more targeted cache clears, see: Making Targeted Drupal Cache Clears using Drush.

  • Use drush cc all for short – jsheffers Nov 10 '14 at 14:48
  • The confusion likely lies in the fact that drush cc all calls drupal_flush_all_caches(). And as a side not, this has changed in Drupal 8... – mpdonadio Nov 10 '14 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy