TemplateView can't be easily extended
When using custom views that extend F3\Fluid\View\TemplateView the required cache backend is not properly initialized because FLOW3s dependency injection is active only for configured classes, not their subclasses.
First I thought this was a bug in the DI mechanism. Meanwhile I'm not sure anymore and I don't know, how other DI-frameworks handle this issue.
A solution would be to extract cache handling into an AOP aspect which is active for subclasses too. Patch follows.
Updated by Bastian Waidelich over 12 years ago
Attached is a patch that extracts syntax tree cache handling into an AOP aspect. I've added an Interface to be able to activate the advice for all implementing classes.
To be able to deactivate caching during development, I've added a Settings.yaml - The caching aspect will only be active if Fluid.syntaxTreeCache.enable is set.
Note: I couldn't verify whether this patch breaks any unit tests, as my test runner does not work at the moment.
Note²: Please double-check the Patch. Windows creates diffs with CRLF line-endings