We have this large website where we would have to deploy html changes in Twig quite often. I'm looking for a solution to clear the Twig cache ONLY. So we do not have to do a general cache rebuild, which consumes a lot of CPU each time. drush cc render
does not work, twig html still cached. Any suggestions?
Add a comment
|
1 Answer
Invalidate the twig cache first, like this:
drush php-eval "\Drupal::service('twig')->invalidate();"
drush cc render
-
This may be the correct answer, but I've found that this can be as slow as running "drush cr". Also, I found that the site will break if twig templates are deleted (and that does not happen with "drush cr")– PereOct 22, 2021 at 10:59