fixed cache initialization for instance configuration

previously the cache was being initialized before the database
connection had been established, thus any settings in the database were
being ignored on startup
Merge branch 'master' into config-cache