The routes_tracker had a bug that caused a significant increase in the number of keys, which has been fixed in this PR.
At least in the Rails 7.0, payload[:request] is always true. And if the value of url_path: payload[:request].path contained an id, there was a bug that generated a large number of keys for each target id.
Perhaps this code expects to branch on redirect. Therefore, it was modified to payload.key?(:location).
Added option to not track all redirects.
For redirects, using conditions such as get '*pages', redirect: '/' in routes.rb could lead to a huge number of keys. By choosing not to track redirects, a significant increase in the number of keys can be prevented.
Tiny refactoring. Removed if route because of it is always true.
Thanks for this great gem! Our application has reduced our code by a few percent 👍
The routes_tracker had a bug that caused a significant increase in the number of keys, which has been fixed in this PR.
payload[:request]
is always true. And if the value ofurl_path: payload[:request].path
contained an id, there was a bug that generated a large number of keys for each target id.payload.key?(:location)
.get '*pages', redirect: '/'
inroutes.rb
could lead to a huge number of keys. By choosing not to track redirects, a significant increase in the number of keys can be prevented.if route
because of it is always true.Thanks for this great gem! Our application has reduced our code by a few percent 👍