You should cache the output of `urls.api.url` in a variable outside this function so you don't evaluate it for each key in the cache.