make sure cache/db dir exists