Rebuilding Drupal’s cache
While theming a Drupal site, it happens often that in order to make your theming changes take place, you have to run the well known
drush cr command.
If you are not sure about the inner workings of Drupal’s caching system, Compony is here to help you out.
To make sure you can work smoothly, you should enable
development mode for your Drupal site. You can do this by running this command on your local machine:
drupal site:mode dev
This command is truly a livesaver for a Frontender, as it disables all sorts of caching layers of Drupal that we generally don't care about while developing.
Gulp will rebuild the cache if you
- Add, rename, move or remove a
- Add, change, move or remove a
- Add, move or remove a
- Change the
This logic will apply to all the themes that you configured Gulp to listen to.
When to rebuild it manually #
When writing a new hook inside a
my-component.theme file, you still need to rebuild the cache manually, as there is no way for Gulp to know what exactly has changed in your