redis_buddy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/redis_buddy/cache_store.rb +10 -3
- metadata +5 -5
@@ -10,9 +10,16 @@ module ActiveSupport
|
|
10
10
|
def write(key, value, options = nil)
|
11
11
|
super do
|
12
12
|
method = options && options[:unless_exist] ? :set_unless_exists : :set
|
13
|
-
|
14
|
-
|
13
|
+
|
14
|
+
if options && options[:expire]
|
15
|
+
if info['redis_version'] <= '1.2.6'
|
16
|
+
method = :set
|
17
|
+
options = options[:expire]
|
18
|
+
else
|
19
|
+
@data.send(:setex, options[:expire], value)
|
20
|
+
end
|
15
21
|
end
|
22
|
+
@data.send(method, key, value, options) if options.is_a?(Integer) || !options[:expire]
|
16
23
|
end
|
17
24
|
end
|
18
25
|
|
@@ -53,7 +60,7 @@ module ActiveSupport
|
|
53
60
|
end
|
54
61
|
|
55
62
|
def clear
|
56
|
-
@data.
|
63
|
+
@data.flushdb
|
57
64
|
end
|
58
65
|
|
59
66
|
def info
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ole Riesenberg
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-10 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -27,8 +27,8 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 1
|
29
29
|
- 0
|
30
|
-
-
|
31
|
-
version: 1.0.
|
30
|
+
- 7
|
31
|
+
version: 1.0.7
|
32
32
|
type: :runtime
|
33
33
|
version_requirements: *id001
|
34
34
|
- !ruby/object:Gem::Dependency
|