Add more checks around the url caching system