Call clear_url_caches() instead of clearing each cache manually.

Thanks to @aaugustin for pointing that out.