Memcached PHP client improvements
authorTim Starling <tstarling@wikimedia.org>
Fri, 3 Aug 2012 07:03:03 +0000 (17:03 +1000)
committerTim Starling <tstarling@wikimedia.org>
Fri, 3 Aug 2012 11:24:55 +0000 (21:24 +1000)
commit76c3ab462ffa3bf7fd57a0e39413bdb12051a7db
tree4d27817d7c81c683a5763b496d8be67576be614e
parent69e1d12fe7e2f15a8a6caa2dcb07ccee028d153a
Memcached PHP client improvements

* When there is a read error, close the socket and mark the server dead,
  instead of continuing to send requests through it, causing a protocol
  violation.
* Also check for write errors.
* Increase the default stream and connect timeouts from 100ms to 500ms.
* Remove the commented-out _safe_fwrite() code that I wrote in 2005,
  that PHP bug is fixed now, so writes can be handled the same way as
  reads.
* Fix E_STRICT errors in get_multi() due to a resource being used as an
  array index.
* For performance, flush the read buffer less often (only on persistent
  connect).
* Move the fread() loop from _load_items() into its own new function.
* Be stricter about stripping expected newlines, don't just run trim() on
  everything.
* Make MemCachedClientforWiki into a simple alias since the distinction
  with MWMemcached was lost many years ago. We even renamed the class
  "MWMemcached".
* Remove vim modeline made incorrect by 19d6293 (Nov 2009).

Change-Id: I81de31049b87038999e37054d8d174a782c78a68
includes/DefaultSettings.php
includes/objectcache/MemcachedBagOStuff.php
includes/objectcache/MemcachedClient.php