You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store routing tokens on request. Use them for routing match tests
This introduces a `routing_tokens` attribute on `Webmachine::Request`,
and uses it to lazily instantiate the tokens used by
`Webmachine::Dispatcher::Route#match?`.
This is to allow requests to optionally override the tokens generated
by splitting the uri path. This is useful if webmachine isn't hosted at
the root path of the uri (as when rack map is used).
This SHOULD also give a performance increase for request routing, as
previously the uri was matched against a regex for every routing test,
and then again when the route was applied after it matched. With this
approach, the regex is run on the uri once only and then memomized in
the request. (note - SHOULD be faster... haven't actually benchmarked
it)
0 commit comments