Modifies query caching slightly to only set the cache if the query is successful.