rails/rails — pull request #10268 by dasch (2013-04-19 13:44:49+00:00)
Title: Add a #select_multi method to cache stores

Allows selecting a subset of a collection for which the cache returns true values. I extracted it from the following usage:

```ruby
# In a controller.
@readable_posts = Rails.cache.select_multi(*@posts) do |post|
# This is very expensive:
can?(:read, post)
end
```

I'm not sure if it's too specific, but it's really useful and efficient. It uses `read_multi`, so it only sends a single `get` to the cache server.