create db and cache class