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 is being rebuilt after rollback #22

Closed
kuzux opened this issue Apr 30, 2020 · 1 comment
Closed

Cache is being rebuilt after rollback #22

kuzux opened this issue Apr 30, 2020 · 1 comment

Comments

@kuzux
Copy link
Contributor

kuzux commented Apr 30, 2020

If we are updating a model in a transaction. Say, the update is performed, saved to DB, but then the DB transaction is rolled back, thermos still regenerates the cache even if the transaction is rolled back.

In most use cases, the cache regeneration block would perform a db query and would not be receiving the changed data from the DB. So, that operation would not result in a cache entry with invalid data being generated, but only a small performance hit

kuzux added a commit to kuzux/thermos that referenced this issue Apr 30, 2020
kuzux added a commit to kuzux/thermos that referenced this issue Apr 30, 2020
kuzux added a commit to kuzux/thermos that referenced this issue Apr 30, 2020
@athal7 athal7 closed this as completed in 3e647bf Apr 30, 2020
@athal7
Copy link
Owner

athal7 commented Apr 30, 2020

Thanks @kuzux! This has been included in the latest release:
https://rubygems.org/gems/thermos/versions/0.3.0

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

2 participants