Update to CodeIgniter 2.1.0
This commit is contained in:
4
system/libraries/Cache/drivers/Cache_apc.php
Executable file → Normal file
4
system/libraries/Cache/drivers/Cache_apc.php
Executable file → Normal file
@@ -132,7 +132,7 @@ class CI_Cache_apc extends CI_Driver {
|
||||
*/
|
||||
public function is_supported()
|
||||
{
|
||||
if ( ! extension_loaded('apc') OR ! function_exists('apc_store'))
|
||||
if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1")
|
||||
{
|
||||
log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
|
||||
return FALSE;
|
||||
@@ -148,4 +148,4 @@ class CI_Cache_apc extends CI_Driver {
|
||||
// End Class
|
||||
|
||||
/* End of file Cache_apc.php */
|
||||
/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
|
||||
/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
|
||||
|
||||
0
system/libraries/Cache/drivers/Cache_dummy.php
Executable file → Normal file
0
system/libraries/Cache/drivers/Cache_dummy.php
Executable file → Normal file
0
system/libraries/Cache/drivers/Cache_file.php
Executable file → Normal file
0
system/libraries/Cache/drivers/Cache_file.php
Executable file → Normal file
11
system/libraries/Cache/drivers/Cache_memcached.php
Executable file → Normal file
11
system/libraries/Cache/drivers/Cache_memcached.php
Executable file → Normal file
@@ -64,7 +64,16 @@ class CI_Cache_memcached extends CI_Driver {
|
||||
*/
|
||||
public function save($id, $data, $ttl = 60)
|
||||
{
|
||||
return $this->_memcached->add($id, array($data, time(), $ttl), $ttl);
|
||||
if (get_class($this->_memcached) == 'Memcached')
|
||||
{
|
||||
return $this->_memcached->set($id, array($data, time(), $ttl), $ttl);
|
||||
}
|
||||
else if (get_class($this->_memcached) == 'Memcache')
|
||||
{
|
||||
return $this->_memcached->set($id, array($data, time(), $ttl), 0, $ttl);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user