-3

The problem I've been having is that whatever changes I made to twig templates, they never appear on the PROD site without cache:clear commands in console.

There are times when checking rapid iterations on a live site are useful without a lot of shell cache clearing.

This led me to ask, Is there a simple way to temporarily disable Symfony 5.1's PROD caches (so that it works more like DEV caches) on a fairly standard setup?

There are a number of documents such as https://symfony.com/doc/current/reference/configuration/twig.html -- but they didn't really help resolve the issues I've had.

Tubusy
  • 31
  • 1
  • 7

1 Answers1

0

After some further digging and experimentation, I found that changing:

//twig.yaml
twig:
     default_path: '%kernel.project_dir%/templates'
     cache: 'false'
     auto_reload: 'true'

seemed to do the trick, but you still have to cache:clear one further time for it to start working.

I have no idea why this should be necessary, but at least it is functioning as expected now.

Tubusy
  • 31
  • 1
  • 7