how to load cache variables into templates

alnux
Member | 139
+
0
-

The question is how to load cache variables (made into presenters side) into latte templates, there is a {cache} macros but i dont understand at all the documentantion.

thanks

Last edited by alnux (2017-05-22 17:20)

matopeto
Member | 395
+
+1
-

Hmm.. as normal variable?

// Retrieve your variable from cache in presenter
$value = $cache->load($key);

// Send it to template
$this->template->cachedVariable = $value;

Last edited by matopeto (2017-05-22 17:45)