versioned cache entries for collections#34424
versioned cache entries for collections#34424gingerlime wants to merge 4 commits intorails:masterfrom
Conversation
* rails#29092 introduced versioned (recyclable) cache entries * Active Record relations however do not yet have support for versioned cache entries * This can lead to performance issues, irrespective of when versioning is on or off (see rails#29092 (comment)) * Irrespective, cache utilization can improve if AR relations also supported recyclable keys * This change added cache_version method in addition to cache_key to relations, and delegating to collection_cache_version similarly to collection_cache_key * updated tests to cover non-versioned relations as well as versioned * this is just a first stab, to gauge interest and explore this direction
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @sgrif (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
|
Travis reports a strange failure I can't reproduce the test failures locally, and they seem unrelated to this change, even with the same seed |
|
that failure is fixed on master by aea9c9a. |
|
This duplicates with #34378. |
|
Thanks @kamipo. I somehow missed it. Shall I close this one then? |
|
Yeah, we basically discuss it on the first one unless that is stale or inactive. |
Summary
cache entries
is on or off
(see Recyclable cache keys #29092 (comment))
supported recyclable keys, and it would be more consistent
cache_key to relations, and delegating to collection_cache_version
similarly to collection_cache_key
Other Information
direction