alephant-broker 1.1.3 → 1.2.0

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: a4905794dc7afc13f2c31d4e12f7a71dfc74d8bf
4
- data.tar.gz: b911cd24b7b3fc9b633d12a045bd646f3964b07b
3
+ metadata.gz: ffbec731bdb53ec91a9c0d1b5194f3e45219e578
4
+ data.tar.gz: 6ad479c7351251f7d160b5550f57e6ffc3767504
5
5
  SHA512:
6
- metadata.gz: 113cc3f0f58df6b1c1e01bd7f6ddceb45a726990b4f7f372d4e9905b9c3e1309db42d13b075b94d404b8a8281b7a5dd3918193074e959c24df26ff814eaba90c
7
- data.tar.gz: f75c8797e657bf9950292c24cb402f111da4178542801ffe34b43f6cce579ad65468bcd8840a47515910b2c0bf14cef1bcd49b93c6945d7565bbb9d949fed238
6
+ metadata.gz: 3038bc90069fd8a25168adb91aef80a7f5ed1388da0a6d726ea2d43d25abfa7d15522aff542097ab1372aae0e10a1c7d56bbb6f27888d83b99c92416ca02c6ac
7
+ data.tar.gz: 3daadef81b28b9b6d7400d08703210f34ab7e8c8a4ae9dc3df72b664b5c72c438188f1d3d8c4ce85ca39c1a16d712ec9aeb15e73a0367ee2125d4da732ead062
@@ -1 +1 @@
1
- jruby-1.7.9
1
+ jruby-1.7
@@ -28,9 +28,17 @@ module Alephant
28
28
  Broker.config['elasticache_ttl'] || DEFAULT_TTL
29
29
  end
30
30
 
31
+ def versioned(key)
32
+ [key, cache_version].compact.join('_')
33
+ end
34
+
35
+ def cache_version
36
+ Broker.config['elasticache_cache_version']
37
+ end
38
+
31
39
  def get(key, &block)
32
40
  begin
33
- result = @@client.get(key)
41
+ result = @@client.get(versioned(key))
34
42
  logger.info("Broker::Cache::Client#get key: #{key} - #{result ? 'hit' : 'miss'}")
35
43
  result ? result : set(key, block.call)
36
44
  rescue StandardError => e
@@ -39,7 +47,7 @@ module Alephant
39
47
  end
40
48
 
41
49
  def set(key, value)
42
- value.tap { |o| @@client.set(key, o) }
50
+ value.tap { |o| @@client.set(versioned(key), o) }
43
51
  end
44
52
 
45
53
  end
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Broker
3
- VERSION = "1.1.3"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec