nette / latte

☕ Latte: the safest & truly intuitive templates for PHP. Engine for those who want the most secure PHP sites.
https://latte.nette.org
Other
1.09k stars 107 forks source link

Latte 2 vs Latte 3: <div n:cache="$cacheKey" id="content"> #328

Closed forgie1 closed 1 year ago

forgie1 commented 1 year ago

Version: 3.0.4

Bug Description

n:cache is not supported in Latte 3? Here is no comment about this BC break: https://latte.nette.org/en/cookbook/migration-from-latte2 .

Steps To Reproduce

<div n:cache="$cacheKey" id="content"> Results in:

Latte\CompileException Unexpected attribute n:cache (in

mabar commented 1 year ago

Here is a comment that cache is registered differently if you use Latte independently (of nette/di) https://latte.nette.org/en/cookbook/migration-from-latte2#toc-nette-caching

If you use full Nette, just update other Nette dependencies.

forgie1 commented 1 year ago

Cache is working just fine, if I use {cache ...} macro. Problem is only with <div n:cache="....

I tested it actually directly on: https://github.com/nette/web-project so there is not any kind of our project special anything ...

dg commented 1 year ago

Fixed in nette/caching (in the 3.1-dev & 3.2-dev for now)