tw_get_cache_db function

Get database connection settings from the environment