Warm your Drupal caches after a cache clear
Issue:
We all know the problem that a Drupal site may be loading slowly after a cache clear.
Prerequisites:
- Drush ≥ 13.5
- Drupal ≥ 11.2
Solution:
There is a new prewarm API introduced in Drupal 11.2. This allows you to add a `cache_prewarmable` tag to your services and implement a preWarm method. If you are using Drush version 13.5 or newer, it will automatically call a `cache:warm` as last step when doing a `drush deploy`.
This will only warm cache cache items that are used to build most pages, plugins and registries, but not render caching or anywhere like that.
Furter informations can be found here: