*/ private array $stack = []; public function __construct(private Nette\Caching\Storage $storage) { } public function initialize(Latte\Runtime\Template $template): void { if ($this->stack) { $file = (new \ReflectionClass($template))->getFileName(); if (@is_file($file)) { // @ - may trigger error end($this->stack)->dependencies[Cache::Files][] = $file; } } } /** * Starts the output cache. Returns true if buffering was started. */ public function createCache(string $key, ?array $args = null): bool { if ($args) { if (array_key_exists('if', $args) && !$args['if']) { $this->stack[] = new \stdClass; return true; } $key = array_merge([$key], array_intersect_key($args, range(0, count($args)))); } if ($this->stack) { end($this->stack)->dependencies[Cache::Items][] = $key; } $cache = new Cache($this->storage, 'Nette.Templating.Cache'); if ($helper = $cache->capture($key)) { $this->stack[] = $helper; if (isset($args['dependencies'])) { $args += $args['dependencies'](); } $helper->dependencies[Cache::Tags] = $args['tags'] ?? null; $helper->dependencies[Cache::Expire] = $args['expiration'] ?? $args['expire'] ?? '+ 7 days'; } return (bool) $helper; } /** * Ends the output cache. */ public function end(): void { $helper = array_pop($this->stack); if ($helper instanceof OutputHelper) { $helper->end(); } } public function rollback(): void { $helper = array_pop($this->stack); if ($helper instanceof OutputHelper) { $helper->rollback(); } } } __halt_compiler();----SIGNATURE:----jfTcUf6a0NbVlNlv+wSAuJR1omIDsXSSRoO0fCOsuTLXJe+y/mDKmvO52z4Ts2crN/WOutIEa37DMvI4Lgj7lem/gfuztaIQAxqrR7T8FZPRR3T2czbUSNbP3jA1XLewrA957+uWj36dnfTPw9hfphPgdqFs+eR8zd3xVCXS3fNAK8pCSsaxdA9VZpoh2gjFUMBOO8b1ELIck5fu9+W9lT5rUJEzfbHwnLKVkA/7rV7JfSRBdKpKWe3xXIvn7ELNpgoxHeLofnIn27EnZHJm0j9JeCMICcuIWYJg24nFDv7BtIzcI4DUvAWuUJNfd+ILAatDCr92+ApaG1rwshFCbi39OJK2HyB5O5gNVe8/80wIZXGNEbaDaJVF5BMMWMU5Qp6YAf0FgX3sHhHa0f+yINToe9anxc1z2b59P/BcTezHegYlwy0PTYspLcFshmzHYkVWWXWeY92sdep1DvoUdnbgMnoxqB58XAWcFiZywgbwlmioQOO0j+wbqpaVdAj0keUF6IXi7m5583HI93Ch1+qiko7gk0EV40QY64ReFwudzQ8esupogvT5WLPY65u5aCSVccXHoOdtKrFhGHrbSoNYPBPWIP4NBP81NfVQWu+Ss7AK0GkWPwRDZlOMz5vvtKDD+feNxgL26A5DmSmHJeYTAPVA2zFLtzRdjOAdHFc=----ATTACHMENT:----OTk5MDkwMzAyMTMxMzc1IDU2MTA5OTU1ODYxODYzNjMgNTAyODM4OTYwOTUzMTE5