summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-06 18:21:59 +0200
committerTimothy Warren <tim@timshomepage.net>2011-10-06 18:21:59 +0200
commit2be33e8762df028af678e775f07ebfefb9b8b334 (patch)
tree5e2bf3279773af7814963cd00063ad28f6b4f903 /system/libraries/Cache/drivers
parentfb7ff742949e0474dfba30be45be513b3b4f63cc (diff)
parentf003804d105aa6d60ee4c26b1e8a77423d99274b (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/libraries/Cache/drivers')
-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;
}
// ------------------------------------------------------------------------