Extended the API class to include updating the cache as a private method. Now requires users to pass in the key for elastic search