summaryrefslogtreecommitdiff
path: root/plugins/MemcachePlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-12 23:53:52 -0800
committerEvan Prodromou <evan@status.net>2010-01-12 23:53:52 -0800
commit436b8c845ea8fcc84f7f2bff71a7fa700d262a01 (patch)
treee81b78c2022ca0770d71c3c3a7980d02a24a2a51 /plugins/MemcachePlugin.php
parentfb0d837ddc572993f8c6d1db3de2c96d70101841 (diff)
parente34ece8b0630394b606b57b19de58c830fad9c4d (diff)
Merge branch '0.9.x' into inblob
Diffstat (limited to 'plugins/MemcachePlugin.php')
-rw-r--r--plugins/MemcachePlugin.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/MemcachePlugin.php b/plugins/MemcachePlugin.php
index 5f93e9a83..fbc2802f7 100644
--- a/plugins/MemcachePlugin.php
+++ b/plugins/MemcachePlugin.php
@@ -133,6 +133,23 @@ class MemcachePlugin extends Plugin
return false;
}
+ function onStartCacheReconnect(&$success)
+ {
+ if (empty($this->_conn)) {
+ // nothing to do
+ return true;
+ }
+ if ($this->persistent) {
+ common_log(LOG_ERR, "Cannot close persistent memcached connection");
+ $success = false;
+ } else {
+ common_log(LOG_INFO, "Closing memcached connection");
+ $success = $this->_conn->close();
+ $this->_conn = null;
+ }
+ return false;
+ }
+
/**
* Ensure that a connection exists
*