Merge "(bug 24437) Add nofollow to image link"
[lhc/web/wiklou.git] / includes / objectcache / MemcachedBagOStuff.php
index 49cad8c..813c272 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Base class for memcached clients.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -48,7 +50,7 @@ class MemcachedBagOStuff extends BagOStuff {
                        $params['timeout'] = $GLOBALS['wgMemCachedTimeout'];
                }
                if ( !isset( $params['connect_timeout'] ) ) {
-                       $params['connect_timeout'] = 0.1;
+                       $params['connect_timeout'] = 0.5;
                }
                return $params;
        }
@@ -84,6 +86,7 @@ class MemcachedBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $value int
+        * @param $exptime int (default 0)
         * @return Mixed
         */
        public function add( $key, $value, $exptime = 0 ) {
@@ -117,6 +120,7 @@ class MemcachedBagOStuff extends BagOStuff {
         * the other control characters for compatibility with libmemcached
         * verify_key. We leave other punctuation alone, to maximise backwards
         * compatibility.
+        * @param $key string
         * @return string
         */
        public function encodeKey( $key ) {
@@ -124,6 +128,10 @@ class MemcachedBagOStuff extends BagOStuff {
                        array( $this, 'encodeKeyCallback' ), $key );
        }
 
+       /**
+        * @param $m array
+        * @return string
+        */
        protected function encodeKeyCallback( $m ) {
                return rawurlencode( $m[0] );
        }