Not sure if this is possible, but we're using 2.8.1 on grails/groovy, client set up as follows...
MemcachedClient c=new MemcachedClient(
AddrUtil.getAddresses("localhost:11211 cachecluster:11211"));
We deploy memcached on each app server node, so we prefer doing operations against the local memcached for low latency, but if local memcached fails, spy fails over to cachecluster, which is a group of remote memcacheds. Obviously, the fail over part is good for HA, but if the local memcached comes back, we'd want the client to start using it again and not the cluster address.
We tested the above with default settings. All sets/gets went to localhost, then we killed localhost; all operations failed over to cachecluster, but after bringing back localhost, the client was stuck on the cachecluster address.
So is there a way to prefer the first address in the list, in our case, localhost?