Forums / Developer / node_view_gui and cache / Comment51473
Gaetano Giunta
Friday 10 July 2009 8:36:56 am
Using $node.node_id should also work as subtree_expiry key.
The ttl=0 on top is there because otherwise the whole template will only be executed when the current node changes and its result stored in the view cache. It will thus not be updated anytime any of the included object or their subchildren change.
I fully agree with Andre that it looks ugly though: using object relations is the best way to get proper change propagation within eZ view caches.
Last but not least, the main question, that has been left unsaked: how comes the standard view cache is not enough for your needs? I can imagine 2 reasons: - the list of nodes included in the loop is huge - the templates used to display those nodes are inefficientMaybe you should look into refactoring somewhere else and not just adding caches...
Principal Consultant International Business Member of the Community Project Board