summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers/Cache_memcached.php
diff options
context:
space:
mode:
authorJohn Bellone <jb@thunkbrightly.com>2011-08-21 15:29:39 +0200
committerJohn Bellone <jb@thunkbrightly.com>2011-08-21 15:29:39 +0200
commit0ad834c03b0300ec9bf111a69bc3af0ed724c6cd (patch)
tree0cfcf40eede88acc94b114432c3df2f4e2e9bc37 /system/libraries/Cache/drivers/Cache_memcached.php
parentcbb81c6a0e0830fa975a5cb4638e39a59504703c (diff)
Fixing configuration
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_memcached.php')
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php
index d16578fc3..8047e5853 100644
--- a/system/libraries/Cache/drivers/Cache_memcached.php
+++ b/system/libraries/Cache/drivers/Cache_memcached.php
@@ -182,9 +182,22 @@ class CI_Cache_memcached extends CI_Driver {
$cache_server['weight'] = $this->_default_options['default_weight'];
}
- $this->_memcached->addServer(
- $cache_server['hostname'], $cache_server['port'], $cache_server['weight']
- );
+ if (get_class($this->_memcached) == 'Memcache') {
+ // Third parameter is persistance and defaults to TRUE.
+ $this->_memcached->addServer(
+ $cache_server['hostname'],
+ $cache_server['port'],
+ TRUE,
+ $cache_server['weight']
+ );
+ }
+ else {
+ $this->_memcached->addServer(
+ $cache_server['hostname'],
+ $cache_server['port'],
+ $cache_server['weight']
+ );
+ }
}
}