added some sanity checks for the APIClient class
Updated the API client's caching mechanism