Is it possible to cache a variable assignment and/or an element query with TWIG in Craft 3? With Yii2 this is possible, but is there a wrapper to TWIG?
2 use cases:
{% set entries = craft.entries.someThingVerySlowHere() %}
{% set myObject = customVerySlowTwigFunction(...) %}
Why would I want to do that? Let's assume I have 2 blocks in my page, both make use of the variables assigned above, then I can not cache this within the block itself (where the {% cache %}
tag belongs, unless I assign/query twice.