Rename some db package's methods
Change Ledger to use cache
Fix several bugs regarding caching of datastore results