generic memcache library with flexible sharding and connection pooling