Cache the value of the "totals" record in memory during transactions.