Fix bug with routing where the cache is empty