synapsestudios/kohana-projecttemplate — comment on commit a9a8c8180232a4009d85e5f93a100d5219d26431
File: application/classes/kostache.php line 20
By isaiahdw:

Yeah it can be handy for some things. I rarely use it though. I normally store the return variable from my function, that way if I use it multiple times in my template the I don't have to run the whole function again.

Example:

public function example()
{
if ($this->_example)
return $this->_example;

// Do some heavy lifting here

return $this->_example = $my_return_data;
}