diff options
author | Kyle Farris <kylefarris@kylefarris.gotdns.org> | 2011-10-14 18:48:53 +0200 |
---|---|---|
committer | Kyle Farris <kylefarris@kylefarris.gotdns.org> | 2011-10-14 18:48:53 +0200 |
commit | 974cc5757e1da3a89af7b9bc700b805ba05dd3bb (patch) | |
tree | 109313ba07a2eed2bb8d015ef5f6af8f9205dae2 /system/libraries/Cache/drivers/Cache_memcached.php | |
parent | 6636cef6fc457b3a0490d051587cb430aa0021d0 (diff) | |
parent | a2125a5d830fd390b4cf35f77e9bb0558cfa2dd7 (diff) |
Merged with develop and updated to new changelog.
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_memcached.php')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_memcached.php | 11 |
1 files changed, 10 insertions, 1 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; } // ------------------------------------------------------------------------ |