[eluser]Unknown[/eluser]
Hi There,
I haven't long started using CI but I must say I am very impressed so far. The other day whilst coding I come across what I assume is a bug.
Code:
$this->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'apc'));
if (!$data['item'] = $this->cache->get('item')) {
$data['item'] = $this->item->fetch_entries(5);
$this->cache->save('item', $data['item'], 500);
}
Produces and error of get() function on a non-object in the Memcache driver. I have found a workaround is calling the $this->cache->memcached->is_supported(); before the if statement after looking through the driver source.
If I use apc as the main adapter no such error occurs as it is immediately initialized.
Cheers