Adding logic to handle memcache protocol