Be carful when casting to int
Don't cast to int, we're converting to json anyway and won't be doing any arithmetic
Don't commit cached data
Save data as json to disk