store the total earnings on the first time they are calculated / retrieved. #1547
Clear necessary caches when earnings are increased / decreased. #1547