Merge r93797 to trunk, in a somewhat modified form: clamp expiries for memcached...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 10 Aug 2011 21:15:57 +0000 (21:15 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 10 Aug 2011 21:15:57 +0000 (21:15 +0000)
includes/objectcache/MemcachedClient.php

index 1d64f45..51d312f 100644 (file)
@@ -948,6 +948,12 @@ class MWMemcached {
                } else {
                        $this->stats[$cmd] = 1;
                }
+               
+               // Memcached doesn't seem to handle very high TTL values very well,
+               // so clamp them at 30 days
+               if ( $exp > 2592000 ) {
+                       $exp = 2592000;
+               }
 
                $flags = 0;