CodeIgniter Forums

Full Version: cache backup adapter?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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?

El Forum

[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.