diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_memcached.php | 11 | ||||
-rw-r--r-- | system/libraries/User_agent.php | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 04aa81a5a..95bdcb350 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -64,7 +64,16 @@ class CI_Cache_memcached extends CI_Driver { */ public function save($id, $data, $ttl = 60) { - return $this->_memcached->set($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; } // ------------------------------------------------------------------------ diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 0b77a7d42..2cdaf509d 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -18,7 +18,7 @@ /** * User Agent Class * - * Identifies the platform, browser, robot, or mobile devise of the browsing agent + * Identifies the platform, browser, robot, or mobile device of the browsing agent * * @package CodeIgniter * @subpackage Libraries @@ -546,4 +546,4 @@ class CI_User_agent { /* End of file User_agent.php */ -/* Location: ./system/libraries/User_agent.php */
\ No newline at end of file +/* Location: ./system/libraries/User_agent.php */ |