You need to create 2 hashmaps:
- Hashmap with UUID to email address (uuid_to_email)
- Hashmap from email to UUID (email_to_uuid)
For instance:
> hset uuid_to_email 39315120-9581-11e3-9c4e-0002a5d5c51b foo@bar.com
> hset email_to_uuid foo@bar.com 39315120-9581-11e3-9c4e-0002a5d5c51b
Then, to get the value, use a hash map that displays the value that you have. If you have a UUID, use uuid_to_email:
> hget uuid_to_email 39315120-9581-11e3-9c4e-0002a5d5c51b
"foo@bar.com"
If you have an email, use email_to_uuid:
> hget email_to_uuid foo@bar.com
"39315120-9581-11e3-9c4e-0002a5d5c51b"