Try one more time before throwing error on template cache file write

This commit is contained in:
Kijin Sung 2025-07-12 20:30:15 +09:00
parent 4193edde25
commit 9d98e47c53

View file

@ -366,11 +366,14 @@ class Template
if (!Storage::exists($this->cache_path) || filemtime($this->cache_path) < $latest_mtime || !$this->cache_enabled)
{
$content = $this->parse();
if (!Storage::write($this->cache_path, $content))
{
if (!Storage::write($this->cache_path, $content))
{
throw new Exception('Cannot write template cache file: ' . $this->cache_path);
}
}
}
$output = $this->execute();