added cache to the API