redis-renew 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/active_support/cache/redis_renew.rb +5 -2
- data/lib/redis-renew/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: f8593b6736882105ac8ffbdca7aa4b618af079fd
|
4
|
+
data.tar.gz: d5902d0714c525d2ce0169aabe6e3db2eda2bef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc98e51236d83b4e3906b2d48e0da826dff3f7c264891cd1cd4f935b27bdbcf9bca98086d5fa26ea883c9a84d5916dcf9c57f19ccc08479463facadd02b16b66
|
7
|
+
data.tar.gz: c19cb5b6f7c5d24f7d05e9d6f23bb5bdde86bafb0c5c5bb1d4343875d58b1c71793ab097c6d0f5f16806c1a68af9178492ebe1ed5a32dcaaacf2cf2330400010
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ With Rails
|
|
28
28
|
# setup Rails.cache to be redis_renew
|
29
29
|
# and set the renewal expiry to be 30 seconds
|
30
30
|
# with each access the expiry is extended 30 seconds
|
31
|
-
config.cache_store = :redis_renew, config.redis_connections['cache'], :renew_expires_in => 30.seconds
|
31
|
+
config.cache_store = :redis_renew, config.redis_connections['cache'], { :renew_expires_in => 30.seconds }
|
32
32
|
end
|
33
33
|
end
|
34
34
|
```
|
@@ -29,7 +29,7 @@ module ActiveSupport
|
|
29
29
|
end
|
30
30
|
else
|
31
31
|
entry = super # do nothing and manually reset expiry
|
32
|
-
expire(key, renew_expires_in)
|
32
|
+
@data.expire(key, renew_expires_in)
|
33
33
|
entry
|
34
34
|
end
|
35
35
|
rescue Errno::ECONNREFUSED, Redis::CannotConnectError
|
@@ -39,7 +39,10 @@ module ActiveSupport
|
|
39
39
|
private
|
40
40
|
|
41
41
|
def connection_supports_multi?
|
42
|
-
|
42
|
+
false
|
43
|
+
# redis-store changes the interface to a redis connection
|
44
|
+
# so the `get` override kills multi
|
45
|
+
# @data.respond_to?(:multi)
|
43
46
|
end
|
44
47
|
end
|
45
48
|
end
|
data/lib/redis-renew/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-renew
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dewitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-store
|