alephant-broker 1.0.4 → 1.0.5

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: 2a69b10a67e9b1c6eebc67f77496e19a23c4f58a
4
- data.tar.gz: a90529e6515cd3e6d5a317adc3caf72ab2316d46
3
+ metadata.gz: 565f5f6b0ad1c0dcfd6024bae98ce1fd1afcb21f
4
+ data.tar.gz: f3f17262eb4a373874951c16c1cd9a8ec0c3d19b
5
5
  SHA512:
6
- metadata.gz: b875bcd888d7ff55b23ec50af47044d384301b856a8f1b59a628cf52c21a11777e4b9afd85b732ab0c3819c4f44346d3fb32f0450c1b2d8921297b7de6b4cb61
7
- data.tar.gz: 3e06250c2e0f3c69c0d72ea01068b3354f1a6f81ef0032cae9f6142a296df3c2d9fcc2f68ffdbf0ed30b580c1632c8902a2e7f6f7fa22d0215fd24204667e25d
6
+ metadata.gz: d77b8eca85c8ee60f7dad50445e49cc93da881dd46050e53d8c609661f7312b0c3a9a68f79a0cd98209e3bbf7760e45f9ca060cd773b62ff86c2c536ece0baeb
7
+ data.tar.gz: ee3493fc5ceb18f301893127c6dfaf2097631bb310d110e2173b5d7c2960d8fb56ec767867ef1a86802b4c6d83a77e2419b39fefac130678f7ea570b2da672b2
@@ -13,10 +13,10 @@ module Alephant
13
13
  def initialize
14
14
  unless config_endpoint.nil?
15
15
  @@elasticache ||= ::Dalli::ElastiCache.new(config_endpoint, { :expires_in => ttl })
16
- @client = @@elasticache.client
16
+ @@client ||= @@elasticache.client
17
17
  else
18
18
  logger.debug('Broker::Cache::Client#initialize: No config endpoint, NullClient used')
19
- @client = NullClient.new
19
+ @@client = NullClient.new
20
20
  end
21
21
  end
22
22
 
@@ -30,7 +30,7 @@ module Alephant
30
30
 
31
31
  def get(key, &block)
32
32
  begin
33
- result = @client.get(key)
33
+ result = @@client.get(key)
34
34
  logger.info("Broker::Cache::Client#get key: #{key} - #{result ? 'hit' : 'miss'}")
35
35
  result ? result : set(key, block.call)
36
36
  rescue StandardError => e
@@ -39,7 +39,7 @@ module Alephant
39
39
  end
40
40
 
41
41
  def set(key, value)
42
- value.tap { |o| @client.set(key, o) }
42
+ value.tap { |o| @@client.set(key, o) }
43
43
  end
44
44
 
45
45
  end
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Broker
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
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.0.4
4
+ version: 1.0.5
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-05-20 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec