Friday, October 23, 2020

Active Record values_at and cache improvements

Posted by morgoth85

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!