Performance improvement when calculation cache keys.