slav123 / codeigniter-xcache

CodeIgniter XCache library

Home Page:http://www.spidersoft.com.au/projects/xcache-driver-codeigniter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#CodeIgniter-xcache

##XCache driver CodeIgniter

Here is a missing XCache driver for CodeIgniter Caching Class. All You need to do is to modify /system/libraries/Cache/Cache.php library and add additional Cache driver to drivers list:

protected $valid_drivers = array('cache_apc', 'cache_file', 'cache_memcached', 'cache_dummy', 'cache_xcache');

Then you need to upload Cache_xcache.php file, to this directory: /system/libraries/Cache/drivers/

##Usage Load cache drivers as usually:

$this->load->driver('cache', array('adapter' => 'xcache'));

and use as it

$this->cache->save('my_variable', array(0=>'data', 1=>'other data'));

print_r($this->cache->get('my_variable'));

Due to XCache limitations You can’t store objects in cache, but you can serialize them before saving :)

##Support To read more about XCache Caching functions please check out XCache API docs

If you have any questions or comments, please leave them here (github) or visit this page:

www.spidersoft.com.au/projects/xcache-driver-codeigniter

About

CodeIgniter XCache library

http://www.spidersoft.com.au/projects/xcache-driver-codeigniter/

License:MIT License


Languages

Language:PHP 100.0%