Update to CodeIgniter 2.1.0
This commit is contained in:
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