Cache the hash on locations where it makes sense, as per danielks suggestion

Change-Id: Ide4546816ea0098151f4a1ac9175a3eaa142d682