added regex caching in route processing