Fix cache db tests

[cache] introduce new MultiDbTest for multi-database environments