gibson 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/active_support/cache/gibson_store.rb +25 -6
- data/lib/gibson/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWU0MjJlNmYyOTkzN2Y4YjliZDcxYmUxNDY5NjBjZDNmNTFkN2I1MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGM1YzQ2ZDc3YzdjZTg2MDI1YjNlYjUzNmY2ZjNlNTM2N2EwZWM2Mw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTliMjViMTdjODA3Y2RjMzRjMDAyNGY5MTYyMWY1YzBjMmEyMTI0MGQ1NDlm
|
10
|
+
ZDM3NTJmMDc2NDAyMWJhMzFkMTJkZjYzYjJmYzY3MzE5MjEyZGZhODFlZDcz
|
11
|
+
MWEzYjg0ZmQwZjYyMjc0ZjU1MmY0MTk4ZmViZTA4ZGNmODNjMTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDRjNTFhYWMxNmU1MmEyNWQwOWQ1MzY0YzVlZDA4YmU1MWQ1YzZiYTJjYjEz
|
14
|
+
MjQzYmQ3MGZkZjE4NWQ1M2ZlNjU3ZWIzZWQ3NzY5NTFlNWZiNzQ0MzA4ZWVl
|
15
|
+
ODMyYzk3YjNjODU2MmYxNDdjMGEyMzY1NTRmMzQ2ZWYzNTFlNWY=
|
@@ -21,29 +21,48 @@ module ActiveSupport
|
|
21
21
|
|
22
22
|
# Deletes all items from the cache.
|
23
23
|
def clear(options = nil)
|
24
|
-
|
24
|
+
begin
|
25
|
+
@gibson.mdel @namespace + "::"
|
26
|
+
rescue
|
27
|
+
0
|
28
|
+
end
|
25
29
|
end
|
26
30
|
|
27
31
|
# Increments an already existing integer value that is stored in the cache.
|
28
32
|
def increment(name, amount = 1, options = nil)
|
29
33
|
key = expand_key(name)
|
30
|
-
|
31
|
-
|
34
|
+
|
35
|
+
begin
|
36
|
+
amount.times do |v|
|
37
|
+
@gibson.inc key
|
38
|
+
end
|
39
|
+
rescue
|
40
|
+
|
32
41
|
end
|
33
42
|
end
|
34
43
|
|
35
44
|
# Decrements an already existing integer value that is stored in the cache.
|
36
45
|
def decrement(name, amount = 1, options = nil)
|
37
46
|
key = expand_key(name)
|
38
|
-
|
39
|
-
|
47
|
+
|
48
|
+
begin
|
49
|
+
amount.times do |v|
|
50
|
+
@gibson.dec key
|
51
|
+
end
|
52
|
+
rescue
|
53
|
+
|
40
54
|
end
|
41
55
|
end
|
42
56
|
|
43
57
|
# Deletes multiple values by expression
|
44
58
|
def delete_matched(matcher, options = nil)
|
45
59
|
key = expand_key(matcher)
|
46
|
-
|
60
|
+
|
61
|
+
begin
|
62
|
+
@gibson.mdel key
|
63
|
+
rescue
|
64
|
+
0
|
65
|
+
end
|
47
66
|
end
|
48
67
|
|
49
68
|
# Returns some stats
|
data/lib/gibson/version.rb
CHANGED