-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(router) implement groups captures from regex URIs
We now perform efficient matching for URIs based on its property and the regex being evaluated. We favorise running `ngx.re.find` when the more expensive `ngx.re.match` is not necessary. When a regex URI has capture groups, we return them from the router `exec()` for further processing inside the core, which will be responsible for passing them along to plugins. This also has the advantage of being more performant on router cache hits, since URI stripping is done only once, at matching type, and cached in the LRU structure. The same way, groups matching is cached as well. Implements: #677 (partially)
- Loading branch information
1 parent
e884ae8
commit ba52268
Showing
2 changed files
with
203 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters