Set twig.cache_templates to false
Added isTemplateCacheDirectoryValid() method