Added configuration of the metastore and entitystore, as well as disabling the cache mechanism when no metastore is configured.