Changed several calls to `isUrlLocal` to use the url string, instead of url object
Used associative array to cache `isUrlLocal` results, reduced 80% of `getLocalDomains` call from `isUrlLocal`