summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers/Cache_memcached.php
diff options
context:
space:
mode:
authorKyle Farris <kylefarris@kylefarris.gotdns.org>2011-10-14 18:48:53 +0200
committerKyle Farris <kylefarris@kylefarris.gotdns.org>2011-10-14 18:48:53 +0200
commit974cc5757e1da3a89af7b9bc700b805ba05dd3bb (patch)
tree109313ba07a2eed2bb8d015ef5f6af8f9205dae2 /system/libraries/Cache/drivers/Cache_memcached.php
parent6636cef6fc457b3a0490d051587cb430aa0021d0 (diff)
parenta2125a5d830fd390b4cf35f77e9bb0558cfa2dd7 (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.php11
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;
}
// ------------------------------------------------------------------------