summaryrefslogtreecommitdiff
path: root/plugins/MemcachePlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-12 23:25:25 -0800
committerEvan Prodromou <evan@status.net>2010-01-12 23:25:25 -0800
commite34ece8b0630394b606b57b19de58c830fad9c4d (patch)
treed6354a6e02517dd75c32f40b1d08a4b9cffd9b11 /plugins/MemcachePlugin.php
parent392bc728c795dd50e19a56cb097ab9a64f129573 (diff)
parentec145b73fc91dd54695dd374c8a71a11e233b8c0 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
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
*