Connected cache and database; added method to access the api