Rewrite memcached example and add new example.