Skip to content
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

Cache isn't invalidated by a counter cache update #362

Open
dylanahsmith opened this issue Jan 23, 2018 · 0 comments
Open

Cache isn't invalidated by a counter cache update #362

dylanahsmith opened this issue Jan 23, 2018 · 0 comments

Comments

@dylanahsmith
Copy link
Contributor

The counter_cache belongs_to option is implemented using update_all, which is done on the models update_counters and reset_counters class methods. Because these don't trigger an after_commit callback, we end up not invalidating the cache for the record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant