Active Record values_at and cache improvements
source link: https://weblog.rubyonrails.org/2020/10/23/this-week-in-rails-active-record-values_at-and-cache-improvements/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Hi, it’s Wojtek bringing you the latest changes summary from Ruby on Rails codebase.
Add values_at method to Active Record
Simplifies retrieving values of specific attributes on Active Record model instance, ie person.values_at(:name, :age).
Use environment variable MEMCACHE_SERVERS by default
When no specific configuration is provided, MEMCACHE_SERVERS environment variable will be checked first before falling back to localhost 127.0.0.1:11211 address in ActiveSupport::Cache::MemCacheStore.
Add store name to cache instrumentation
When subscribing to a “cache” instrumentation events, additional parameter with store name is provided to ease recognizing the context.
12 people contributed to Rails since the last week. Check out the detailed list of all changes. Until next week!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK