bulk_cache_fetcher 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e95dac1446f4fbeb5d57c0036475a7b8c5ce08b3
4
- data.tar.gz: bcd85e15b816226daa978a3ee4aad5295fc0f887
3
+ metadata.gz: f2012f42799511be205c0a27036b7a447dbf56b3
4
+ data.tar.gz: 54172b0aea06cbec9d7549bbe9963bb5ebcb7bea
5
5
  SHA512:
6
- metadata.gz: 3aba42a22a052d4cace6f66895ed775669c0f346c8bfb32aa38804935f827b663610e847edc868f10b64fbe3d7516131c41eb0449420cba2eff881d58ce63f97
7
- data.tar.gz: 8d3ef1bf3effadf0a2fa67eafe94734b20a7b4bf087dde24ff916a0704528a0b126db7c74c510447c2c136614d2c10eac0eefa923d4613ea8fd9b204d1d4b6eb
6
+ metadata.gz: ea8c5960bc5df03785da93819ba29fae48390ccdcc5c6fae2fb25bb67b8e0052229e38e67eb3be8444a508c05c2573648ac22531f9aa5bcf9034087418d26102
7
+ data.tar.gz: 5142b31a0a0c5e8fab81ef56acabf45c35e44beade392b077950763e4abdff93ae521efcd070d39c7a36fd5727d5d95341629f8411c26623b9d784d185d3fc72
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # BulkCacheFetcher
2
2
 
3
+ [![Build Status](https://travis-ci.org/justinweiss/bulk_cache_fetcher.png?branch=master)](https://travis-ci.org/justinweiss/bulk_cache_fetcher) [![Code Climate](https://codeclimate.com/github/justinweiss/bulk_cache_fetcher.png)](https://codeclimate.com/github/justinweiss/bulk_cache_fetcher)
4
+
3
5
  Bulk Cache Fetcher fills the gap between [Russian doll caching](http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works) and the n+1 queries problem.
4
6
 
5
7
  Russian doll caching is really great for handling views and
@@ -5,7 +5,7 @@
5
5
  # Rails' nested caching while avoiding the n+1 queries problem in the
6
6
  # uncached case.
7
7
  class BulkCacheFetcher
8
- VERSION = '0.0.2'
8
+ VERSION = '0.0.3'
9
9
 
10
10
  # Creates a new bulk cache fetcher, backed by +cache+. Cache must
11
11
  # respond to the standard Rails cache API, described on
@@ -44,7 +44,7 @@ class BulkCacheFetcher
44
44
  uncached_identifiers = object_identifiers.dup
45
45
 
46
46
  cache_keys = cache_keys(object_identifiers)
47
- found_objects = @cache.read_multi(cache_keys)
47
+ found_objects = @cache.read_multi(*cache_keys)
48
48
 
49
49
  cache_keys.each do |cache_key|
50
50
  cached_object = found_objects[cache_key]
@@ -10,7 +10,7 @@ class InMemoryCache
10
10
 
11
11
  def read(key); cache[key]; end
12
12
  def write(key, value, opts = {}); options[key] = opts; cache[key] = value; end
13
- def read_multi(keys)
13
+ def read_multi(*keys)
14
14
  results = {}
15
15
  keys.each do |key|
16
16
  results[key] = read(key) if read(key)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulk_cache_fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Weiss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - .gitignore
63
+ - .travis.yml
63
64
  - Gemfile
64
65
  - LICENSE.txt
65
66
  - README.md