add caching to api