Added a counter for node disk writes
Tracking cache stats in the db object (also in a cleaner way)