[Bug fix][Active Record] Cache keys failing to correctly expire for collections with offset/limit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug fix][Active Record] Cache keys failing to correctly expire for collections with offset/limit

Aaron Lipman
I'm seeking to resolve a several year old bug in the way Active Record generates cache key versions for collections using an offset or limit. This bug arises in the real world when paginating records (as reported via #31996, #34408 and #37555).

Please refer to my pull request's summary for a more detailed explanation of the issue, plus benchmarks for my proposed fix:

One concern folks may have with this solution is that it moves somewhat higher-level cache key logic to the connector level. However after considering alternatives for some time, I'm confident this is the cleanest path to support multiple RDBMSs.

Hoping a member of the Rails team may find the time to review and/or approve my solution. Any feedback from the broader community greatly appreciated as well!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/768ebc34-c2bb-45d0-9c2c-b99b21257272%40googlegroups.com.