Explicitly disable templating cache for tools/render-tpl.

This commit is contained in:
flash 2025-01-30 14:59:02 +00:00
parent 269dc78919
commit 0701298fa1
2 changed files with 3 additions and 3 deletions

View file

@ -135,7 +135,7 @@ class MisuzuContext {
return $this->chatUrl;
}
public function startTemplating(): void {
public function startTemplating(bool $cache = true): void {
$globals = $this->config->getValues([
['eeprom.path:s', '', 'eeprom_path'],
['eeprom.app:s', '', 'eeprom_app'],
@ -150,7 +150,7 @@ class MisuzuContext {
$this->templating = new TplEnvironment(
MSZ_TEMPLATES,
cache: $isDebug ? null : ['Misuzu', GitInfo::hash(true)],
cache: $isDebug || !$cache ? null : ['Misuzu', GitInfo::hash(true)],
debug: $isDebug
);
$this->templating->addExtension(new TemplatingExtension($this));

View file

@ -80,7 +80,7 @@ $msz->createRouting(new HttpRequest('::1', true, 'XX', '1.1', 'GET', '/', [], []
new HttpHeader('Host', $hostName),
]), null));
$msz->startTemplating();
$msz->startTemplating(false);
$ctx = $msz->templating->load(implode(' ', array_slice($argv, $pathIndex)));