Details
-
Improvement
-
Resolution: Fixed
-
High
-
5.0.0rc1
-
None
Description
AS pointed out by review by Sensio, current code will lead to new cache generated every time the content returned from legacy is different.
The code causing the issue:
# eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator $twigContentTemplate = <<<EOT {% extends "{$layout}" %} {% block {$options['contentBlockName']} %} {$contentViewClosure( $params )} {% endblock %} EOT;
Two solutions are available:
- Having a physical template and use it directly.
- Changing the template above to display the content as a twig variable:
$twigContentTemplate = <<<EOT {% extends "{$layout}" %} {% block {$options['contentBlockName']} %} {{ content|raw }} {% endblock %} EOT;