better validation of urls as cache key