Memoize mapping hash in the header