Shopify/identity_cache — pull request #146 by Thibaut (2014-04-20 16:09:12+00:00)
Title: Add fetch_multi_by

This adds a `fetch_multi_by` method for non-unique index keys.

**Example:**

```ruby
class Item < ActiveRecord::Base
cache_index :title
end

titles = %w(one two three)
```

**Before:** `titles.map { |title| Item.fetch_by_title(title) }.flatten`

**After:** `Item.fetch_multi_by_title(titles)`

The new method still makes one read/query per key (`title`) but it fetches all the records in a single `fetch_multi` call.

Let me know if you like this approach and I can add the same method for unique indexes.

@arthurnn @camilo @dylanahsmith