alephant-lookup 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/lookup/lookup_cache.rb +6 -6
- data/lib/alephant/lookup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b2ced2eb0c4adf58ae48151dfe5a7a49930ac17
|
4
|
+
data.tar.gz: 3541872b33fe27ac33f012b2f9b8e7986a49fdb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80164e635e6676eddf4fba5db2fcf3107647facd1c7c81b2e89ae56943a01c3eacd0d9bdd9cff4a84b9d133b8c56ef036514fec425e98c6d904fd0b3e157e952
|
7
|
+
data.tar.gz: 2ba31a2257781ceb806496a1c2f3d795dbb7c109e354303a1a51ea5473b62f48638a557db0294f4cb5d732730facdccac242a020aeca229cd836c7596eb17220
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "dalli-elasticache"
|
2
|
+
require "alephant/logger"
|
3
3
|
|
4
4
|
module Alephant
|
5
5
|
module Lookup
|
@@ -8,7 +8,7 @@ module Alephant
|
|
8
8
|
|
9
9
|
attr_reader :config
|
10
10
|
|
11
|
-
DEFAULT_TTL =
|
11
|
+
DEFAULT_TTL = 2
|
12
12
|
|
13
13
|
def initialize(config={})
|
14
14
|
@config = config
|
@@ -46,15 +46,15 @@ module Alephant
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def ttl
|
49
|
-
config[
|
49
|
+
config["lookup_elasticache_ttl"] || DEFAULT_TTL
|
50
50
|
end
|
51
51
|
|
52
52
|
def versioned(key)
|
53
|
-
[key, cache_version].compact.join(
|
53
|
+
[key, cache_version].compact.join("_")
|
54
54
|
end
|
55
55
|
|
56
56
|
def cache_version
|
57
|
-
config[
|
57
|
+
config["elasticache_cache_version"]
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|