for --fast, move the part that writes the cache to be after the bill is successfully parsed