-
Notifications
You must be signed in to change notification settings - Fork 239
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
Added ability to touch the parent #80
Conversation
fixed: parent argument receives object, not name
I don't quite understand this request—are you wanting children to force an update on parents? Why? It looks like this pull request adds the option, but no implementation. If you want to add an implementation with test coverage, I'm happy to take a new PR. Thanks! |
I'm using closure for nested menus. When a child is updated, the root item need to be touched to invalidate the cache. |
Do you want to make the touch be recursive, or should it only touch the immediate parent? |
in my case, i need to invalidated the root. |
I will send another PR when i write tests |
Caching is broken without this feature... sad, have to implement your own touch functionality. 👎 |
I reimplemented it in another commit. just add |
Well then this feature is broken. Using version
The two updated_at timestamps should be identical (if not a small fraction of time different). The above shows the parent hasn't been touched in the last 20 minutes, meaning my cache was not busted. |
As the documentation in the README says:
It does not touch parents ( |
My workaround:
Successfully busts the cache when |
Just add :touch => true to the options of acts_as_tree.