Explicitly disable templating cache for tools/render-tpl.
This commit is contained in:
parent
269dc78919
commit
0701298fa1
2 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ class MisuzuContext {
|
||||||
return $this->chatUrl;
|
return $this->chatUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function startTemplating(): void {
|
public function startTemplating(bool $cache = true): void {
|
||||||
$globals = $this->config->getValues([
|
$globals = $this->config->getValues([
|
||||||
['eeprom.path:s', '', 'eeprom_path'],
|
['eeprom.path:s', '', 'eeprom_path'],
|
||||||
['eeprom.app:s', '', 'eeprom_app'],
|
['eeprom.app:s', '', 'eeprom_app'],
|
||||||
|
@ -150,7 +150,7 @@ class MisuzuContext {
|
||||||
|
|
||||||
$this->templating = new TplEnvironment(
|
$this->templating = new TplEnvironment(
|
||||||
MSZ_TEMPLATES,
|
MSZ_TEMPLATES,
|
||||||
cache: $isDebug ? null : ['Misuzu', GitInfo::hash(true)],
|
cache: $isDebug || !$cache ? null : ['Misuzu', GitInfo::hash(true)],
|
||||||
debug: $isDebug
|
debug: $isDebug
|
||||||
);
|
);
|
||||||
$this->templating->addExtension(new TemplatingExtension($this));
|
$this->templating->addExtension(new TemplatingExtension($this));
|
||||||
|
|
|
@ -80,7 +80,7 @@ $msz->createRouting(new HttpRequest('::1', true, 'XX', '1.1', 'GET', '/', [], []
|
||||||
new HttpHeader('Host', $hostName),
|
new HttpHeader('Host', $hostName),
|
||||||
]), null));
|
]), null));
|
||||||
|
|
||||||
$msz->startTemplating();
|
$msz->startTemplating(false);
|
||||||
|
|
||||||
$ctx = $msz->templating->load(implode(' ', array_slice($argv, $pathIndex)));
|
$ctx = $msz->templating->load(implode(' ', array_slice($argv, $pathIndex)));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue