Move format_url into Cache.