diff options
author | Greg Aker <greg@gregaker.net> | 2011-10-06 06:43:49 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-10-06 06:43:49 +0200 |
commit | f003804d105aa6d60ee4c26b1e8a77423d99274b (patch) | |
tree | b4c974be4ead4e493cd5462a5c80c07d455be528 /system/libraries | |
parent | 19fea6a23e7153177f2591a367eaa2431fa1b14b (diff) | |
parent | ba00e9f3d9737ca5ae3b56817df9ae6cc6f53696 (diff) |
Merge pull request #483 from markhuot/develop
resolve a difference between the two memcache set method parameters
Diffstat (limited to 'system/libraries')
-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; } // ------------------------------------------------------------------------ |