Cache the calculated hash code

R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//692053002