[eluser]Jelmer[/eluser]
In order to use it in your view you first need access to the CodeIgniter superobject:
Code:
$ci =& get_instance();
If you haven't loaded it yet you can load it like this:
Code:
$ci->load->library('MP_Cache');
And after that you can use it like this:
Code:
$data = $ci->mp_cache->get('example');
if ($data === false)
{
$data = 'data to cache';
$ci->mp_cache->write($data, 'example');
}
I'd recommend doing the caching it the controller though, instead of in the view.