Fix caching errors that cause repeated requests to apis