-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove invalidate_cached_urls. #1998
Conversation
Not too big of a change for 2-0-stable? |
It's a private api so in theory it should be safe to remove/change. Other option (probably a bit safer since we don't have specs) is to just remove |
We don't need to call rebuild! from awesome-nested-set ? (that alias_method_chain ) #1954 (comment) When I was testing it, my tree was allways valid, so it returned true. But is there any situations, when tree is not valid and rebuild! should run? |
awesome_nested_set checks if tree is invalid and only rebuilds if it's invalid. See https://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set/awesome_nested_set.rb#L184-185. Tbh I have no idea when tree can become invalid (maybe if you do some manual record editing in db or something like that). |
I think that it's safer to merge any of this into master not 2-0-stable branch. I don't consider any of this a bug fix. If anybody disagrees please let me know. |
This code isn't present in master so it only applies to 2-0-stable. I can agree that it's safer not to merge this in 2-0-stable but we need to do something about #1954 since it's a real issue. |
Can we just stop calling it? |
@ugisozols can you please document this in the changelog? |
@parndt done ^ |
Another PR in here too? :-) |
I actually don't get it why it's here because I only rebased against remove_invalidate_cached_urls... |
@parndt I squashed everything into one commit. |
@ugisozols does this need verification, or can it be closed, then? |
If you're ok with this change please merge it. |
It's not needed because: * cache is cleared by after_filter in admin pages controller * when rebuild is called it runs #invalidate_cached_urls on every page and its children so in case user has many pages it causes a lot of queries which increases load time and sometimes even time out. See #1954 for discussion.
Sure thing |
It's not needed because:
and its children so in case user has many pages it causes a lot of
queries which increases load time and sometimes even time out.
See #1954 for discussion.