CodeIgniter Forums
cache backup adapter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: cache backup adapter? (/thread-45033.html)



cache backup adapter? - El Forum - 09-06-2011

[eluser]ipsod[/eluser]
Hi.

I initiate the caching driver like this:
Code:
$this->load->driver( 'cache', array('adapter'=>'apc', 'backup'=>'file') );


but get this error:
Quote:Fatal error: Call to undefined function apc_fetch() in /home/indig/public_html/syrupx.com/system/libraries/Cache/drivers/Cache_apc.php on line 41

I thought the 'backup'=>'file' part was supposed to fallback to file if APC wasn't on the server?


cache backup adapter? - El Forum - 06-27-2012

[eluser]riggerthegeek[/eluser]
I believe it to be a bug. I've got similar issues when I've tried using the Memcached caching driver, as my server hasn't got it.

The only thing I can suggest is to install APC (or Memcached). Simple enough on an Ubuntu server
Code:
sudo apt-get install php-apc php5-memcached

Personally, I find this driver a bit shonky for this very reason. I prefer to use the file-based caching.