lock_and_cache 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +6 -0
- data/lib/lock_and_cache/action.rb +2 -2
- data/lib/lock_and_cache/key.rb +2 -2
- data/lib/lock_and_cache/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c89613cc8fdd7ed23861149ccfc49e664af988d6b917757f09c18b18b5415f0b
|
4
|
+
data.tar.gz: 286efd9473fedfbd8e7de5175d9a4ec374bde72757d103bd9c964faa6af1bc70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15f13a8204942588e436ddd5a0eec963148d179a10bf3268401316b8479f2857f50e5e83a47d324765c57f614c7e11b2656b7643c139ebbce6e6b67f1c2969ba
|
7
|
+
data.tar.gz: 28d901547a8b96a9065514151149176eef91c5ed9fb76274b7a7e655bba4f8f584b6246e20534342022ae1bddbfe4918cbe73cedcb7936fa886962b117c698bd
|
data/CHANGELOG
CHANGED
@@ -55,7 +55,7 @@ module LockAndCache
|
|
55
55
|
raise "heartbeat_expires must be >= 2 seconds" unless heartbeat_expires >= 2
|
56
56
|
heartbeat_frequency = (heartbeat_expires / 2).ceil
|
57
57
|
LockAndCache.logger.debug { "[lock_and_cache] A1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
|
58
|
-
if cache_storage.exists(digest) and (existing = cache_storage.get(digest)).is_a?(String)
|
58
|
+
if cache_storage.exists?(digest) and (existing = cache_storage.get(digest)).is_a?(String)
|
59
59
|
return load_existing(existing)
|
60
60
|
end
|
61
61
|
LockAndCache.logger.debug { "[lock_and_cache] B1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
|
@@ -71,7 +71,7 @@ module LockAndCache
|
|
71
71
|
acquired = true
|
72
72
|
end
|
73
73
|
LockAndCache.logger.debug { "[lock_and_cache] D1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
|
74
|
-
if cache_storage.exists(digest) and (existing = cache_storage.get(digest)).is_a?(String)
|
74
|
+
if cache_storage.exists?(digest) and (existing = cache_storage.get(digest)).is_a?(String)
|
75
75
|
LockAndCache.logger.debug { "[lock_and_cache] E1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
|
76
76
|
retval = load_existing existing
|
77
77
|
end
|
data/lib/lock_and_cache/key.rb
CHANGED
@@ -98,11 +98,11 @@ module LockAndCache
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def locked?
|
101
|
-
LockAndCache.lock_storage.exists lock_digest
|
101
|
+
LockAndCache.lock_storage.exists? lock_digest
|
102
102
|
end
|
103
103
|
|
104
104
|
def cached?
|
105
|
-
LockAndCache.cache_storage.exists digest
|
105
|
+
LockAndCache.cache_storage.exists? digest
|
106
106
|
end
|
107
107
|
|
108
108
|
def clear
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lock_and_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seamus Abshere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -181,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
|
-
|
185
|
-
rubygems_version: 2.6.13
|
184
|
+
rubygems_version: 3.0.3
|
186
185
|
signing_key:
|
187
186
|
specification_version: 4
|
188
187
|
summary: Lock and cache methods.
|