If you've been looking to expire a key, either when incrementing or decrementing it, with Rails 5.2s Redis cache store. Just pass expires_in to make the key sleep with the fishes.
The Rails guides are vast and deep. There's so many that the digging deeper section almost dug its own grave. But splitting out into another section is a saving grace. Why not look through the current guides?
Instantiating a list of Active Record objects is now faster and allocates less. If the array has the same instances that is. It's made possible by not looking up the same STI column each time through the loop.
Rails 5.1s syntactic sugar for retry_job, retry_on and discard_on that is, only took one exception so you'd have to duplicate exception blocks or spread a retry on multiple lines. No longer! Get your high in a single line of sugar.
Wrapping Up
20 people contributed to Rails this past week. There might be some open issues you can try tackling?
See you next week!
This Week in Rails · 30 N Racine #200 · Chicago IL 60607 · USA