memcached_store 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77f6ff3dcde9c204c41292c561764f19b198a552
|
4
|
+
data.tar.gz: 3b784d277f5cf922082e31fc007290db685d846e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eac52dea6f5850280f2ff75f5ee45628af7d9416f90de3bf81f3b6634e8f9af5a7fda438dec36ab3aa9b62f4594733aa8e297e914da1b615e628bbfadd08694a
|
7
|
+
data.tar.gz: 4509b4c17cc097d654abbc461cc24394ca74f338345c379eccf808c7bafa9c184a8df0d9ab7a033d4e3ec48e9de396e4b115dfde03d5e9b07304c697f2242ea2
|
@@ -33,8 +33,11 @@ module ActiveSupport
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def deserialize_entry(compressed_value)
|
36
|
-
|
37
|
-
|
36
|
+
if compressed_value
|
37
|
+
super(Snappy.inflate(compressed_value))
|
38
|
+
else
|
39
|
+
nil
|
40
|
+
end
|
38
41
|
end
|
39
42
|
end
|
40
43
|
end
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class TestMemcachedSnappyStore < ActiveSupport::TestCase
|
4
4
|
|
5
5
|
setup do
|
6
|
-
@cache = ActiveSupport::Cache.lookup_store(:memcached_snappy_store
|
6
|
+
@cache = ActiveSupport::Cache.lookup_store(:memcached_snappy_store)
|
7
7
|
@cache.clear
|
8
8
|
end
|
9
9
|
|
@@ -61,6 +61,12 @@ class TestMemcachedSnappyStore < ActiveSupport::TestCase
|
|
61
61
|
assert_nil @cache.read(key)
|
62
62
|
end
|
63
63
|
|
64
|
+
test "get should work when there is a connection fail" do
|
65
|
+
key = 'ponies2'
|
66
|
+
@cache.instance_variable_get(:@data).expects(:check_return_code).raises(Memcached::ConnectionFailure).at_least_once
|
67
|
+
assert_nil @cache.read(key)
|
68
|
+
end
|
69
|
+
|
64
70
|
test "should use snappy to multi read cache entries but not on missing entries" do
|
65
71
|
keys = %w{ one tow three }
|
66
72
|
values = keys.map{ |k| k * 10 }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memcached_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Camilo Lopez
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-01-
|
13
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|