I have got an error while loading cache library in codeigniter(2.1.3). What it is saying is this:
An Error Was Encountered
Unable to load the requested class: cache
My Code Looks like this
if (!$data['foo'] = $this->cache->file->get('details')) {
$data['foo'] = $this->foo->getdetails();
$this->cache->file->save('details', $data['foo'], 600);
}
My autoload file is like this:
$autoload['libraries'] = array('database','form_validation','session','driver','cache');
Hi every body i got the answer of this issue.
Finally i made a custom library and call that in my autoload file. it solved my problem.
and The Code is here
class CallCache {
public function __construct($config = array())
{
$ci = &get_instance();
$ci->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
}
}
Finally Thank God
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With