Added API query caching.