Welcome Guest, Not a member yet? Register   Sign In
Trying to use MP_Cache but cant find class definition
#1

[eluser]Unknown[/eluser]
I am trying to use the MP_Cache (https://bitbucket.org/jschreuder/mp_cache/). It seems to save the cache file alright but when I try to load it I get this error:

Quote:Fatal error: main() [<a href='function.main'>function.main</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;CI_DB_mysql_result&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home/victorsigma/timmithoydiles.com/application/views/test.php on line 20

In my controller is:
Code:
class TestPage extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this->load->library('MP_Cache');
    }
    
    function index()
    {    
        
        $query = $this->mp_cache->get('recent_thumbs');
        if ($query === false)
        {
            $query = $this->skins->get_random(4);
            $this->mp_cache->write($query, 'recent_thumbs',15);
        }
        
        if ($query->num_rows() > 0)
            echo "SUCCESS";
}}




Theme © iAndrew 2016 - Forum software by © MyBB