h2ocube_rails_cache 0.0.12 → 0.0.13

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: 970d3130443c25f9d9ad4b4ea743a093c855c278
4
- data.tar.gz: 6988038c4058ffbb5e92d835b3ad193856c532cf
3
+ metadata.gz: e6fdaa111c24c74f76968d52aa0c38baec02601f
4
+ data.tar.gz: 78296c48b10451b8b962d1cc778aca9dca6b4a38
5
5
  SHA512:
6
- metadata.gz: 225df978a051539130158dd667649f3484a2de61d05f9e7504129a3911005f84b38ea32d2d888cb945f1e90ae2bc803a234a2789dbca7ddf07acd25a820a88d7
7
- data.tar.gz: 170ca11920ba240eb2f878047b61b66033c2f88564e09d6e55d73d2c68f2d3370f178c5a96c566d7cbac3069d58146937a5d65032f6758727ca821a6c9760f0a
6
+ metadata.gz: 88be1bbae3b0e746009e637841014d2464fdbfc578c8278e88a1e19928ba0145028b8ae95a759fe7da85c5bf9559e77179bb325c4c7613fbe215a2da881d80b8
7
+ data.tar.gz: d7295800b31495b54e493e68be8ea36048b1ec838f129e5f9d5635ef27cb777ff6af7473c5ec8ce04b8440128145e3ead2a1cdffb62c59b01e6983d020862bd7
data/README.md CHANGED
@@ -21,6 +21,7 @@ Disable default session_store in config/initializers/session_store.rb
21
21
 
22
22
  * `keys key = '*'`
23
23
  * `read key, options = {}`
24
+ * `read_multi *keys`
24
25
  * `write key, entry, options = {}`
25
26
  * `fetch key, options = {}, &block`
26
27
  * `delete key, options = {}`
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'h2ocube_rails_cache'
7
- gem.version = '0.0.12'
7
+ gem.version = '0.0.13'
8
8
  gem.authors = ['Ben']
9
9
  gem.email = ['ben@h2ocube.com']
10
10
  gem.description = 'Just an redis cache.'
@@ -57,6 +57,18 @@ module ActiveSupport
57
57
  @data.get key
58
58
  end
59
59
 
60
+ def read_multi(*names)
61
+ results = {}
62
+
63
+ names.each do |name|
64
+ entry = read(name)
65
+
66
+ results[name] = entry unless entry.nil?
67
+ end
68
+
69
+ results
70
+ end
71
+
60
72
  def write(key, entry, options = {})
61
73
  key = expanded_key key
62
74
  return false if key.start_with?('http')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2ocube_rails_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-namespace