kokspflanze / ZfcTwig

Laminas / Zend Framework 2/3 Module that provides a Twig 1/2/3 rendering strategy
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

How do we disable cache? #20

Closed Saeven closed 6 years ago

Saeven commented 6 years ago

Thank you for this excellent fork.

exptom commented 6 years ago

@Saeven

In any of your module config files or perhaps config\autoload\local.php (specific file is up to you and dependent on how you implement dev/live environments):

[
    'zfctwig' => [
        'environment_options' => [
            'cache' => false
        ]
]

You can set the other twig environment options in that array also as per twig docs

kokspflanze commented 6 years ago

@exptom thanks=) i think that should help

Saeven commented 6 years ago

Thank you - I had tried that and was misled by the result to believe it didn't work. Turns out I'm being kicked in the teeth by gettext cache, not twig cache. Whole new problem. Thanks for your help.