mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-21 04:59:49 +01:00
New option: $config[twig_cache]
This commit is contained in:
parent
bebd364a59
commit
a97b08db42
@ -1715,3 +1715,6 @@
|
||||
|
||||
// Use oekaki?
|
||||
$config['oekaki'] = false;
|
||||
|
||||
// Twig cache?
|
||||
$config['twig_cache'] = false;
|
||||
|
@ -213,8 +213,10 @@ $config['show_sages'] = false;
|
||||
$config['katex'] = false;
|
||||
$config['enable_antibot'] = false;
|
||||
$config['spam']['unicode'] = false;
|
||||
$config['twig_cache'] = true;
|
||||
// 8chan specific mod pages
|
||||
require '8chan-mod-pages.php';
|
||||
|
||||
// Load database credentials
|
||||
require "secrets.php";
|
||||
|
||||
|
@ -23,7 +23,7 @@ function load_twig() {
|
||||
$loader->setPaths($config['dir']['template']);
|
||||
$twig = new Twig_Environment($loader, array(
|
||||
'autoescape' => false,
|
||||
'cache' => is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache')) ?
|
||||
'cache' => (is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache'))) && $config['twig_cache'] ?
|
||||
"{$config['dir']['template']}/cache" : false,
|
||||
'debug' => $config['debug']
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user