Finish off the Cache database driver.  Update the tests for it.  The
old test was testing directly against the database driver which had a
slightly different API than the Cache interface.  Switch to testing
the Cache interface directly, instead which means some changes in the
test but no real changes in the rest of the codebase, except for one
tiny mistake I found.