0
这是树枝,我在斯利姆注入它在容器中的观点:Slim + Twig - 如何在开发过程中关闭Twig缓存?
// Views and Templates
// https://www.slimframework.com/docs/features/templates.html
$container['view'] = function ($container) {
$settings = $container->get('settings');
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader, array(
'cache' => 'cache',
));
// Add twig extension.
$twig->addExtension(new \Twig_Extensions_Extension_Array());
return $twig;
};
使用此设置,总是枝杈从缓存中读取的模板。有没有什么办法可以在开发期间关闭缓存?