@lru_cache(maxsize=ROUTER_CACHE_SIZE)<EOL><INDENT>def _get(self, url, method, host):<DEDENT>
url = host + url<EOL>route = self.routes_static.get(url)<EOL>method_not_supported = self._invalid_usage(<EOL>'<STR_LIT>'.format(<EOL>method, url), status_code=<NUM_LIT>)<EOL>if route:<EOL><INDENT>if route.methods and method not in route.methods:<EOL><INDENT>raise method_not_supported<EOL><DEDENT>match = route.pattern.match(url)<EOL><DEDENT>else:<EOL><INDENT>route_found = False<EOL>for route in self.routes_dynamic[url_hash(url)]:<EOL><INDENT>match = route.pattern.match(url)<EOL>route_found |= match is not None<EOL>if match and method in route.methods:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for route in self.routes_always_check:<EOL><INDENT>match = route.pattern.match(url)<EOL>route_found |= match is not None<EOL>if match and method in route.methods:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if route_found:<EOL><INDENT>raise method_not_supported<EOL><DEDENT>raise self._not_found(<EOL>'<STR_LIT>'.format(url))<EOL><DEDENT><DEDENT><DEDENT>kwargs = {p.name: p.cast(value)<EOL>for value, p<EOL>in zip(match.groups(<NUM_LIT:1>), route.parameters)}<EOL>route_handler = route.handler<EOL>if hasattr(route_handler, '<STR_LIT>'):<EOL><INDENT>route_handler = route_handler.handlers[method]<EOL><DEDENT>return route_handler, [], kwargs, route.uri<EOL>
Get a request handler based on the URL of the request, or raises an
        error.  Internal method for caching.

        :param url: request URL
        :param method: request method
        :return: handler, arguments, keyword arguments