Fix cells caching by using cache_key_with_version instead of cache version#7532
Fix cells caching by using cache_key_with_version instead of cache version#7532oriolgual merged 6 commits intodecidim:developfrom armandfardeau:fix/cache-version
Conversation
I think a rather easy ways to add some testing for it would be to create e.g. 20 proposal records and add a test for the If you want to test the case in question (running under Rails 5.1 defaults), you could run the same test by temporarily disabling cache versioning from the proposals by stubbing the method We recently bumped into another similar issue with different Rails 5.1 defaults which was fixed and tested using a similar method (#7488). As per how to test this in an actual use case, just merge and backport this fix, deploy it to Metadecidim and see if the problem disappears that there currently is. 😄 |
Thanks, I will add the test asap |
|
@armandfardeau tests don't seem to be getting enqueued, could you try rebasing the PR to latest |
I fear that's some tweaking is needed. |
|
@armandfardeau could you update this branch with develop? I've reverted #7534 so that the CI is back on, sorry for the issues 🙏 |
Done 😄 |
* develop: Fix infinite loop when impersonated session time runs out (#7221) New Crowdin updates (#7543) Migrate Admin menus to Menu Registry Part 2 (#7382) Replace xls with xlsx (#7421) Use cache_key_with_version instead of cache version (#7532) Add support for ElectionGuard voting scheme (#7454) Fix record encryptor trying to decrypt empty strings (#7542) Revert "Don't schedule CI jobs for locales PRs (#7534)" (#7546) New Crowdin updates (#7540) New Crowdin updates (#7539)
* Use cache_key_with_version instead of cache version * Use cache_key_with_version on last activity cell * Test when multiple proposals are cached * Fix typo in test name
🎩 What? Why?
Fix nil value in cache hash when ActiveRecord::Base.cache_versioning is set to false.
📌 Related Issues
Testing
Not sure how this should be tested right now.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.