DNN-3472 IsLocalURI function is called too often
added localized caching of url and whether it is local