added caching functionality to apis