Bring in working parts of cached-db to v1.62