Added more code to get/put messages from/to memcached