memcached 1.7.2 → 1.8.0

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjNiOGJhNWE4NjRlNjg2ZDBjNzA4MGY3NjI5YWI3NzNlMDE4YjE0ZA==
4
+ ZWNkZDUxYTc2YjU3NDA0MGY4OTMwNTg0N2U4NzRiYzgwYjg4MWFkMw==
5
5
  data.tar.gz: !binary |-
6
- NTBlYWQxZWYwOWI0NjI4MzQ5YzdhNTYyNzI1NDc3ZWEzZmNjZTY2MQ==
6
+ MDUwM2YyZWU5OWFlYjMzN2VmZjI3MjgyNGM3M2U1YzVjOTU2ZDEzNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDc3YWIzY2I1YTRjNDkzZGZiY2MyNDVmNjg1N2E3NjJmMDM4NGMyYmRhZjFj
10
- MjU2NWY4MWFjMGZkMjgwNjgxYjczMDJiY2UyN2E3YmExYmNiMWRiYTAyN2Iy
11
- YTcyM2I1NzEyYzkzZWViMDVhYTU5NGVmMzQ2MDk1OTI1MjMyYWE=
9
+ ZmE0YjI1NTBjZDIyZjRkYzZmY2MyYmQwN2JhMGI0YmMwMTk1ZGFiMmM1ZmRl
10
+ MWQ5MzAxODUyNGMwZmUyYmM4NWM2MjY3OTI3MjIwODI5ODMyMDZhMmVhMDE2
11
+ ZjNlZWIzYTRmOTJiOTE4ODU0ZWQwNTI1OTkzYjBiODRiM2U2OGE=
12
12
  data.tar.gz: !binary |-
13
- MGFjMjQwNmQ0MjRjODcxN2VkNjljZjhkYjc2YjMwOTQwNzcxYjA5ZTM2YTVj
14
- MmQ1MTkyNDYxODViODA5OTI5YmYzNGQ2OTM1NGFmZDVlODNiNjE5NjEyZmE4
15
- NDE2N2FjMjg4ZDkyOTJmMzJiMGFkMDMzMzRmODRiY2NkYTllYjY=
13
+ ODY2MDk4Nzk3MDc0NGM1NDU1YjM4YjJmOGMwMjlhYjcxNDk4MTQyNDMzYWM5
14
+ ZDYwNDNkZjFiOGE3ZTg2YTg2ZmRiYjM5ZDQ2MTQ3Y2VmMmIzOTQ1NmIyZmYz
15
+ Mzc5YjE5ZjhlNTVhZGQyYjc1Y2I0N2VjNDFkZjIzNmEzOGVmMjI=
Binary file
data.tar.gz.sig CHANGED
Binary file
data/BENCHMARKS CHANGED
@@ -7,122 +7,136 @@ You can easily run your own benchmarks, as long as you have memcached itself on
7
7
 
8
8
  == x86-64 OS X
9
9
 
10
- These benchmarks were run on a 64-bit OS X machine, with memcached 1.4.5:
11
-
12
- Darwin winter.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
13
- ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]
14
- RUBY_VERSION=ruby-1.9.2-p290
15
- Ruby 1.9.2p290
16
- Loaded memcached 1.4.0
17
- Loaded remix-stash 1.1.3
18
- Loaded memcache-client 1.8.5
19
- Loaded kgio 2.6.0
20
- Loaded dalli 1.1.5
21
- PID is 7161
22
- Loops is 50000
23
- Stack depth is 0
24
- Small value size is: 19 bytes
25
- Large value size is: 4189 bytes
26
- user system total real
27
- set: dalli:bin 6.230000 2.860000 9.090000 ( 13.771901)
28
- set: libm:ascii 0.900000 1.600000 2.500000 ( 6.201596)
29
- set: libm:ascii:pipeline 0.380000 0.010000 0.390000 ( 0.399863)
30
- set: libm:ascii:udp 0.540000 0.810000 1.350000 ( 3.033980)
31
- set: libm:bin 0.660000 1.550000 2.210000 ( 5.829103)
32
- set: libm:bin:buffer 0.310000 0.560000 0.870000 ( 1.335899)
33
- set: mclient:ascii 13.760000 3.640000 17.400000 ( 17.519859)
34
- set: stash:bin 4.350000 2.260000 6.610000 ( 10.901810)
35
-
36
- get: dalli:bin 6.370000 3.040000 9.410000 ( 13.762127)
37
- get: libm:ascii 1.130000 1.710000 2.840000 ( 6.472671)
38
- get: libm:ascii:pipeline 1.350000 2.480000 3.830000 ( 8.459317)
39
- get: libm:ascii:udp 0.770000 0.910000 1.680000 ( 3.084506)
40
- get: libm:bin 1.450000 2.910000 4.360000 ( 9.041859)
41
- get: libm:bin:buffer 1.390000 3.400000 4.790000 ( 9.160760)
42
- get: mclient:ascii 15.390000 3.890000 19.280000 ( 19.325698)
43
- get: stash:bin 3.630000 2.310000 5.940000 ( 9.561887)
44
-
45
- get-multi: dalli:bin 11.220000 4.720000 15.940000 ( 15.977336)
46
- get-multi: libm:ascii 1.150000 1.190000 2.340000 ( 4.063418)
47
- get-multi: libm:ascii:pipeline 1.160000 1.190000 2.350000 ( 4.063346)
48
- get-multi: libm:ascii:udp 1.200000 1.110000 2.310000 ( 2.746055)
49
- get-multi: libm:bin 1.520000 2.320000 3.840000 ( 5.053102)
50
- get-multi: libm:bin:buffer 1.560000 2.350000 3.910000 ( 5.154312)
51
-
52
- append: dalli:bin 5.470000 2.930000 8.400000 ( 24.011438)
53
- append: libm:ascii 1.290000 1.790000 3.080000 ( 17.774130)
54
- append: libm:ascii:pipeline 0.450000 0.040000 0.490000 ( 6.633257)
55
- append: libm:ascii:udp 1.070000 0.970000 2.040000 ( 14.307639)
56
- append: libm:bin 1.010000 1.740000 2.750000 ( 17.286027)
57
- append: libm:bin:buffer 1.570000 3.060000 4.630000 ( 11.351744)
58
- append: mclient:ascii 13.860000 4.610000 18.470000 ( 28.063347)
59
-
60
- prepend: dalli:bin 5.480000 2.920000 8.400000 ( 24.141383)
61
- prepend: libm:ascii 1.290000 1.800000 3.090000 ( 17.990164)
62
- prepend: libm:ascii:pipeline 0.460000 0.050000 0.510000 ( 6.913219)
63
- prepend: libm:ascii:udp 1.080000 0.970000 2.050000 ( 14.498750)
64
- prepend: libm:bin 1.010000 1.750000 2.760000 ( 17.490186)
65
- prepend: libm:bin:buffer 1.590000 3.030000 4.620000 ( 11.528854)
66
- prepend: mclient:ascii 13.820000 4.590000 18.410000 ( 27.996415)
67
-
68
- delete: dalli:bin 5.190000 2.860000 8.050000 ( 12.158696)
69
- delete: libm:ascii 1.730000 1.760000 3.490000 ( 6.891763)
70
- delete: libm:ascii:pipeline 0.270000 0.010000 0.280000 ( 0.286750)
71
- delete: libm:ascii:udp 1.280000 0.960000 2.240000 ( 3.521770)
72
- delete: libm:bin 1.670000 1.730000 3.400000 ( 6.670207)
73
- delete: libm:bin:buffer 1.990000 1.420000 3.410000 ( 3.408682)
74
- delete: mclient:ascii 12.300000 3.440000 15.740000 ( 15.004959)
75
-
76
- get-missing: dalli:bin 5.190000 2.900000 8.090000 ( 12.288468)
77
- get-missing: libm:ascii 1.890000 1.930000 3.820000 ( 7.300238)
78
- get-missing: libm:ascii:pipeline 2.000000 2.400000 4.400000 ( 7.861120)
79
- get-missing: libm:ascii:udp 1.420000 1.000000 2.420000 ( 3.684960)
80
- get-missing: libm:bin 2.450000 2.880000 5.330000 ( 9.904413)
81
- get-missing: libm:bin:buffer 2.590000 3.600000 6.190000 ( 10.558657)
82
- get-missing: mclient:ascii 12.610000 3.520000 16.130000 ( 16.112399)
83
-
84
- append-missing: dalli:bin 5.440000 2.930000 8.370000 ( 13.119090)
85
- append-missing: libm:ascii 2.060000 2.060000 4.120000 ( 8.168211)
86
- append-missing: libm:ascii:pipeline 0.410000 0.020000 0.430000 ( 0.423779)
87
- append-missing: libm:ascii:udp 1.470000 0.980000 2.450000 ( 4.093117)
88
- append-missing: libm:bin 1.800000 1.880000 3.680000 ( 7.384185)
89
- append-missing: libm:bin:buffer 1.920000 2.500000 4.420000 ( 8.242885)
90
- append-missing: mclient:ascii 12.780000 3.560000 16.340000 ( 16.303513)
91
-
92
- prepend-missing: dalli:bin 5.440000 2.940000 8.380000 ( 13.143816)
93
- prepend-missing: libm:ascii 2.060000 2.050000 4.110000 ( 8.207103)
94
- prepend-missing: libm:ascii:pipeline 0.390000 0.010000 0.400000 ( 0.405324)
95
- prepend-missing: libm:ascii:udp 1.480000 0.980000 2.460000 ( 4.100100)
96
- prepend-missing: libm:bin 1.820000 1.910000 3.730000 ( 7.485082)
97
- prepend-missing: libm:bin:buffer 1.930000 2.490000 4.420000 ( 8.220931)
98
- prepend-missing: mclient:ascii 12.750000 3.570000 16.320000 ( 16.327426)
99
-
100
- set-large: dalli:bin 8.210000 4.760000 12.970000 ( 20.323687)
101
- set-large: libm:ascii 0.980000 1.690000 2.670000 ( 6.540981)
102
- set-large: libm:ascii:pipeline 0.750000 0.620000 1.370000 ( 1.374806)
103
- set-large: libm:ascii:udp 0.590000 0.880000 1.470000 ( 3.345455)
104
- set-large: libm:bin 0.720000 1.620000 2.340000 ( 6.085282)
105
- set-large: libm:bin:buffer 0.540000 1.000000 1.540000 ( 2.073624)
106
- set-large: mclient:ascii 15.440000 5.050000 20.490000 ( 21.033437)
107
- set-large: stash:bin 6.990000 2.970000 9.960000 ( 14.580058)
108
-
109
- get-large: dalli:bin 6.430000 3.050000 9.480000 ( 13.863885)
110
- get-large: libm:ascii 1.280000 1.910000 3.190000 ( 7.413390)
111
- get-large: libm:ascii:pipeline 1.510000 2.690000 4.200000 ( 9.178352)
112
- get-large: libm:ascii:udp 0.940000 1.050000 1.990000 ( 3.705017)
113
- get-large: libm:bin 1.580000 3.140000 4.720000 ( 10.028901)
114
- get-large: libm:bin:buffer 1.550000 3.740000 5.290000 ( 10.237274)
115
- get-large: mclient:ascii 15.090000 3.590000 18.680000 ( 18.686119)
116
- get-large: stash:bin 4.810000 3.010000 7.820000 ( 13.311248)
117
-
118
- hash:default 0.540000 0.010000 0.550000 ( 0.537555)
119
- hash:md5 0.910000 0.000000 0.910000 ( 0.914356)
120
- hash:crc 0.620000 0.000000 0.620000 ( 0.624606)
121
- hash:fnv1_64 0.420000 0.000000 0.420000 ( 0.421316)
122
- hash:fnv1a_64 0.380000 0.000000 0.380000 ( 0.376717)
123
- hash:fnv1_32 0.370000 0.000000 0.370000 ( 0.368479)
124
- hash:fnv1a_32 0.350000 0.000000 0.350000 ( 0.353779)
125
- hash:hsieh 0.160000 0.000000 0.160000 ( 0.161812)
126
- hash:murmur 0.220000 0.000000 0.220000 ( 0.220061)
127
- hash:jenkins 0.270000 0.000000 0.270000 ( 0.264617)
128
- hash:none 0.160000 0.000000 0.160000 ( 0.165394)
10
+ These benchmarks were run on a 64-bit OS X machine, with memcached 1.7.2:
11
+
12
+ Darwin Arthurs-MacBook-Pro.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
13
+ ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
14
+ RUBYOPT=-rbundler/setup
15
+ RUBYLIB=/Users/arthurnn/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.1/lib
16
+ Ruby 2.0.0p353
17
+ Loaded memcached 1.7.2
18
+ Loaded remix-stash 1.1.3
19
+ Loaded memcache-client 1.8.5
20
+ Loaded dalli 2.6.4
21
+ PID is 67055
22
+ Loops is 50000
23
+ Stack depth is 0
24
+ Small value size is: 19 bytes
25
+ Large value size is: 4189 bytes
26
+ user system total real
27
+ set: dalli:bin 6.440000 2.910000 9.350000 ( 10.563638)
28
+ set: libm:ascii 0.790000 1.800000 2.590000 ( 6.383041)
29
+ set: libm:ascii:pipeline 0.190000 0.010000 0.200000 ( 0.202092)
30
+ set: libm:ascii:udp 0.550000 0.940000 1.490000 ( 3.119734)
31
+ set: libm:bin 0.590000 1.790000 2.380000 ( 6.075610)
32
+ set: libm:bin:buffer 0.160000 0.440000 0.600000 ( 0.887930)
33
+ set: mclient:ascii 6.280000 3.380000 9.660000 ( 10.730003)
34
+ set: stash:bin 3.540000 1.990000 5.530000 ( 9.223562)
35
+
36
+ get: dalli:bin 6.680000 3.390000 10.070000 ( 11.180611)
37
+ get: libm:ascii 1.070000 1.830000 2.900000 ( 6.305700)
38
+ get: libm:ascii:pipeline 1.240000 2.440000 3.680000 ( 7.115719)
39
+ get: libm:ascii:udp 0.830000 1.020000 1.850000 ( 3.171187)
40
+ get: libm:bin 0.850000 2.290000 3.140000 ( 6.281492)
41
+ get: libm:bin:buffer 0.840000 2.600000 3.440000 ( 6.200500)
42
+ get: mclient:ascii 8.070000 3.530000 11.600000 ( 12.345600)
43
+ get: stash:bin 3.090000 2.100000 5.190000 ( 8.480606)
44
+
45
+ get-multi: dalli:bin 5.930000 2.180000 8.110000 ( 8.108164)
46
+ get-multi: libm:ascii 0.940000 0.970000 1.910000 ( 2.837050)
47
+ get-multi: libm:ascii:pipeline 0.940000 0.970000 1.910000 ( 2.824970)
48
+ get-multi: libm:ascii:udp 0.780000 0.610000 1.390000 ( 1.639728)
49
+ get-multi: libm:bin 0.750000 1.570000 2.320000 ( 3.138594)
50
+ get-multi: libm:bin:buffer 0.770000 1.610000 2.380000 ( 3.192629)
51
+
52
+ append: dalli:bin 5.740000 2.980000 8.720000 ( 16.344137)
53
+ append: libm:ascii 1.020000 1.950000 2.970000 ( 12.789710)
54
+ append: libm:ascii:pipeline 0.230000 0.070000 0.300000 ( 3.346092)
55
+ append: libm:ascii:udp 0.770000 1.100000 1.870000 ( 9.013537)
56
+ append: libm:bin 0.800000 1.950000 2.750000 ( 12.440546)
57
+ append: libm:bin:buffer 0.600000 1.570000 2.170000 ( 4.633185)
58
+ append: mclient:ascii 6.330000 3.470000 9.800000 ( 17.164551)
59
+
60
+ prepend: dalli:bin 5.710000 2.840000 8.550000 ( 16.196913)
61
+ prepend: libm:ascii 1.040000 1.970000 3.010000 ( 13.116495)
62
+ prepend: libm:ascii:pipeline 0.230000 0.060000 0.290000 ( 3.606279)
63
+ prepend: libm:ascii:udp 0.760000 1.090000 1.850000 ( 10.152684)
64
+ prepend: libm:bin 0.790000 1.880000 2.670000 ( 12.556400)
65
+ prepend: libm:bin:buffer 0.600000 1.600000 2.200000 ( 5.044049)
66
+ prepend: mclient:ascii 6.350000 3.440000 9.790000 ( 17.142962)
67
+
68
+ delete: dalli:bin 5.800000 2.980000 8.780000 ( 9.778920)
69
+ delete: libm:ascii 1.420000 1.990000 3.410000 ( 6.912480)
70
+ delete: libm:ascii:pipeline 0.130000 0.010000 0.140000 ( 0.139597)
71
+ delete: libm:ascii:udp 1.050000 1.030000 2.080000 ( 3.356582)
72
+ delete: libm:bin 1.350000 1.940000 3.290000 ( 6.627281)
73
+ delete: libm:bin:buffer 0.840000 0.900000 1.740000 ( 1.812440)
74
+ delete: mclient:ascii 5.980000 3.260000 9.240000 ( 9.918309)
75
+
76
+ exist: dalli:bin 6.680000 3.420000 10.100000 ( 11.182683)
77
+ exist: libm:ascii 0.580000 1.810000 2.390000 ( 6.127155)
78
+ exist: libm:ascii:pipeline 1.110000 2.390000 3.500000 ( 6.927549)
79
+ exist: libm:ascii:udp 0.360000 0.920000 1.280000 ( 2.827431)
80
+ exist: libm:bin 0.540000 1.760000 2.300000 ( 5.829209)
81
+ exist: libm:bin:buffer 0.330000 1.030000 1.360000 ( 1.668925)
82
+
83
+ get-missing: dalli:bin 5.800000 2.760000 8.560000 ( 9.562492)
84
+ get-missing: libm:ascii 1.500000 1.950000 3.450000 ( 6.884550)
85
+ get-missing: libm:ascii:pipeline 1.550000 2.690000 4.240000 ( 7.153775)
86
+ get-missing: libm:ascii:udp 1.170000 1.220000 2.390000 ( 3.620543)
87
+ get-missing: libm:bin 1.570000 2.520000 4.090000 ( 7.067088)
88
+ get-missing: libm:bin:buffer 1.510000 2.690000 4.200000 ( 6.904890)
89
+ get-missing: mclient:ascii 6.040000 3.230000 9.270000 ( 9.908836)
90
+
91
+ append-missing: dalli:bin 5.830000 3.140000 8.970000 ( 10.275904)
92
+ append-missing: libm:ascii 1.750000 2.150000 3.900000 ( 7.840195)
93
+ append-missing: libm:ascii:pipeline 0.210000 0.050000 0.260000 ( 0.260620)
94
+ append-missing: libm:ascii:udp 1.270000 1.180000 2.450000 ( 3.927083)
95
+ append-missing: libm:bin 1.490000 2.080000 3.570000 ( 7.330363)
96
+ append-missing: libm:bin:buffer 1.560000 2.520000 4.080000 ( 7.541846)
97
+ append-missing: mclient:ascii 6.180000 3.290000 9.470000 ( 10.531754)
98
+
99
+ prepend-missing: dalli:bin 5.830000 3.180000 9.010000 ( 10.289729)
100
+ prepend-missing: libm:ascii 1.780000 2.210000 3.990000 ( 7.993564)
101
+ prepend-missing: libm:ascii:pipeline 0.210000 0.060000 0.270000 ( 0.274244)
102
+ prepend-missing: libm:ascii:udp 1.260000 1.190000 2.450000 ( 3.898849)
103
+ prepend-missing: libm:bin 1.470000 2.100000 3.570000 ( 7.282732)
104
+ prepend-missing: libm:bin:buffer 1.560000 2.540000 4.100000 ( 7.578402)
105
+ prepend-missing: mclient:ascii 6.180000 3.280000 9.460000 ( 10.530963)
106
+
107
+ exist-missing: dalli:bin 6.000000 3.140000 9.140000 ( 10.188436)
108
+ exist-missing: libm:ascii 0.940000 1.990000 2.930000 ( 6.798681)
109
+ exist-missing: libm:ascii:pipeline 1.020000 2.390000 3.410000 ( 6.467459)
110
+ exist-missing: libm:ascii:udp 0.610000 1.060000 1.670000 ( 3.301365)
111
+ exist-missing: libm:bin 0.920000 2.000000 2.920000 ( 6.681597)
112
+ exist-missing: libm:bin:buffer 1.040000 2.540000 3.580000 ( 7.287630)
113
+
114
+ set-large: dalli:bin 7.100000 3.370000 10.470000 ( 11.795271)
115
+ set-large: libm:ascii 0.860000 1.850000 2.710000 ( 6.650196)
116
+ set-large: libm:ascii:pipeline 0.300000 0.270000 0.570000 ( 0.586590)
117
+ set-large: libm:ascii:udp 0.580000 0.970000 1.550000 ( 3.266937)
118
+ set-large: libm:bin 0.630000 1.800000 2.430000 ( 6.203372)
119
+ set-large: libm:bin:buffer 0.260000 0.680000 0.940000 ( 1.260024)
120
+ set-large: mclient:ascii 6.680000 3.700000 10.380000 ( 11.808357)
121
+ set-large: stash:bin 5.080000 2.520000 7.600000 ( 11.345483)
122
+
123
+ get-large: dalli:bin 6.740000 3.700000 10.440000 ( 11.605284)
124
+ get-large: libm:ascii 1.080000 1.860000 2.940000 ( 6.403185)
125
+ get-large: libm:ascii:pipeline 1.200000 2.350000 3.550000 ( 6.870392)
126
+ get-large: libm:ascii:udp 0.810000 1.020000 1.830000 ( 3.129513)
127
+ get-large: libm:bin 0.810000 2.150000 2.960000 ( 5.941723)
128
+ get-large: libm:bin:buffer 0.790000 2.410000 3.200000 ( 5.724441)
129
+ get-large: mclient:ascii 8.150000 3.240000 11.390000 ( 12.305832)
130
+ get-large: stash:bin 3.140000 2.130000 5.270000 ( 8.635335)
131
+
132
+ hash:default 0.330000 0.000000 0.330000 ( 0.328978)
133
+ hash:md5 0.630000 0.000000 0.630000 ( 0.631381)
134
+ hash:crc 0.380000 0.000000 0.380000 ( 0.376241)
135
+ hash:fnv1_64 0.240000 0.000000 0.240000 ( 0.242814)
136
+ hash:fnv1a_64 0.250000 0.000000 0.250000 ( 0.245082)
137
+ hash:fnv1_32 0.240000 0.000000 0.240000 ( 0.242794)
138
+ hash:fnv1a_32 0.250000 0.000000 0.250000 ( 0.245309)
139
+ hash:hsieh 0.090000 0.000000 0.090000 ( 0.096613)
140
+ hash:murmur 0.150000 0.000000 0.150000 ( 0.145111)
141
+ hash:jenkins 0.160000 0.000000 0.160000 ( 0.161225)
142
+ hash:none 0.100000 0.000000 0.100000 ( 0.097352)
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v1.8.0. Add support for multi-entry CAS (fbogsany).
2
+ Make rails client .delete method more consistent with other APIs
3
+
1
4
  v1.7.2. Don't build libmemcached docs (peppo1616).
2
5
 
3
6
  v1.7.1. Override lib target.
data/Gemfile CHANGED
@@ -1,2 +1,11 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec
3
+
4
+ gem 'echoe', '>= 4.6.5'
5
+
6
+ group :benchmark do
7
+ gem "remix-stash", '~> 1.1.3'
8
+ gem "dalli", '~> 2.6.4'
9
+ gem "memcache", '= 1.4.1'
10
+ gem "memcache-client", '~> 1.8.5'
11
+ end
@@ -1,32 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- memcached (1.6.2)
4
+ memcached (1.8.0)
5
5
 
6
6
  GEM
7
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
8
8
  specs:
9
9
  activesupport (3.2.6)
10
10
  i18n (~> 0.6)
11
11
  multi_json (~> 1.0)
12
12
  allison (2.0.3)
13
- echoe (4.6.3)
13
+ dalli (2.6.4)
14
+ echoe (4.6.5)
14
15
  allison (>= 2.0.3)
15
- gemcutter (>= 0.7.0)
16
16
  rake (>= 0.9.2)
17
- rdoc (>= 3.6.1)
17
+ rdoc (>= 2.5.11)
18
18
  rubyforge (>= 2.0.4)
19
- gemcutter (0.7.1)
20
19
  i18n (0.6.0)
21
- json (1.7.3)
22
- json_pure (1.7.3)
23
- metaclass (0.0.1)
24
- mocha (0.12.0)
20
+ json_pure (1.8.1)
21
+ memcache (1.4.1)
22
+ memcache-client (1.8.5)
23
+ metaclass (0.0.4)
24
+ mocha (1.0.0)
25
25
  metaclass (~> 0.0.1)
26
26
  multi_json (1.3.6)
27
27
  rake (0.9.2.2)
28
- rdoc (3.12)
29
- json (~> 1.4)
28
+ rdoc (4.1.0)
29
+ remix-stash (1.1.3)
30
30
  rubyforge (2.0.4)
31
31
  json_pure (>= 1.1.7)
32
32
 
@@ -35,7 +35,11 @@ PLATFORMS
35
35
 
36
36
  DEPENDENCIES
37
37
  activesupport
38
- echoe
38
+ dalli (~> 2.6.4)
39
+ echoe (>= 4.6.5)
40
+ memcache (= 1.4.1)
41
+ memcache-client (~> 1.8.5)
39
42
  memcached!
40
43
  mocha
41
44
  rake
45
+ remix-stash (~> 1.1.3)
data/Manifest CHANGED
@@ -9,8 +9,6 @@ Rakefile
9
9
  TODO
10
10
  ext/extconf-make.rb
11
11
  ext/extconf.rb
12
- ext/lib64/libmemcached.la
13
- ext/lib64/pkgconfig/libmemcached.pc
14
12
  ext/libmemcached-0.32/AUTHORS
15
13
  ext/libmemcached-0.32/COPYING
16
14
  ext/libmemcached-0.32/ChangeLog
@@ -1,8 +1,8 @@
1
- memcached
1
+ = memcached
2
2
 
3
3
  An interface to the libmemcached C client.
4
4
 
5
- {<img src="https://travis-ci.org/evan/memcached.png" alt="Build Status" />}[https://travis-ci.org/evan/memcached]
5
+ {<img src="https://travis-ci.org/evan/memcached.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/evan/memcached]
6
6
 
7
7
  == License
8
8
 
@@ -75,11 +75,9 @@ Note that the API is not the same as that of <b>Ruby-MemCache</b> or <b>memcache
75
75
  $cache.delete 'test'
76
76
  $cache.get 'test' #=> raises Memcached::NotFound
77
77
 
78
- == Rails
78
+ == Rails 3 and 4
79
79
 
80
- # config/environment.rb
81
- require "memcached/rails"
82
- config.cache_store = Memcached::Rails.new(:servers => ['127.0.0.1'])
80
+ Use {memcached_store gem}[https://github.com/Shopify/memcached_store] to integrate ActiveSupport cache store and memcached gem
83
81
 
84
82
  == Pipelining
85
83
 
data/Rakefile CHANGED
@@ -1,4 +1,3 @@
1
- gem 'echoe', '>= 4.5.6'
2
1
  require 'echoe'
3
2
 
4
3
  ENV["GEM_CERTIFICATE_CHAIN"]="memcached.pem"
@@ -108,7 +107,7 @@ def with_vm(vm, cmd)
108
107
  end
109
108
  end
110
109
 
111
- task :test_18 do
110
+ task :test_20 do
112
111
  with_vm("/usr/bin/ruby", "test")
113
112
  end
114
113
 
@@ -120,7 +119,7 @@ task :test_rbx do
120
119
  with_vm("/usr/local/rubinius/1.2.4/bin/rbx", "test")
121
120
  end
122
121
 
123
- task :test_all => [:test_18, :test_19, :test_rbx]
122
+ task :test_all => [:test_20, :test_19, :test_rbx]
124
123
 
125
124
  task :prerelease => [:manifest, :test_all, :install]
126
125
 
@@ -8,22 +8,22 @@ end
8
8
  HERE = File.expand_path(File.dirname(__FILE__))
9
9
  BUNDLE_PATH = Dir.glob("libmemcached-*").first
10
10
 
11
- SOLARIS_32 = Config::CONFIG['target'] == "i386-pc-solaris2.10"
12
- BSD = Config::CONFIG['host_os'].downcase =~ /bsd/
11
+ SOLARIS_32 = RbConfig::CONFIG['target'] == "i386-pc-solaris2.10"
12
+ BSD = RbConfig::CONFIG['host_os'].downcase =~ /bsd/
13
13
 
14
- $CFLAGS = "#{Config::CONFIG['CFLAGS']} #{$CFLAGS}".gsub("$(cflags)", "").gsub("-fno-common", "").gsub("-Werror=declaration-after-statement", "")
14
+ $CFLAGS = "#{RbConfig::CONFIG['CFLAGS']} #{$CFLAGS}".gsub("$(cflags)", "").gsub("-fno-common", "").gsub("-Werror=declaration-after-statement", "")
15
15
  $CFLAGS << " -std=gnu99" if SOLARIS_32
16
16
  $CFLAGS << " -I/usr/local/include" if BSD
17
17
  $EXTRA_CONF = " --disable-64bit" if SOLARIS_32
18
- $LDFLAGS = "#{Config::CONFIG['LDFLAGS']} #{$LDFLAGS} -L#{Config::CONFIG['libdir']}".gsub("$(ldflags)", "").gsub("-fno-common", "")
19
- $CXXFLAGS = "#{Config::CONFIG['CXXFLAGS']} -std=gnu++98"
20
- $CC = "CC=#{Config::MAKEFILE_CONFIG["CC"].inspect}"
18
+ $LDFLAGS = "#{RbConfig::CONFIG['LDFLAGS']} #{$LDFLAGS} -L#{RbConfig::CONFIG['libdir']}".gsub("$(ldflags)", "").gsub("-fno-common", "")
19
+ $CXXFLAGS = "#{RbConfig::CONFIG['CXXFLAGS']} -std=gnu++98"
20
+ $CC = "CC=#{RbConfig::MAKEFILE_CONFIG["CC"].inspect}"
21
21
 
22
22
  # JRuby's default configure options can't build libmemcached properly
23
23
  LIBM_CFLAGS = defined?(JRUBY_VERSION) ? "-fPIC -g -O2" : $CFLAGS
24
24
  LIBM_LDFLAGS = defined?(JRUBY_VERSION) ? "-fPIC -lsasl2 -lm" : $LDFLAGS
25
25
 
26
- GMAKE_CMD = Config::CONFIG['host_os'].downcase =~ /bsd|solaris/ ? "gmake" : "make"
26
+ GMAKE_CMD = RbConfig::CONFIG['host_os'].downcase =~ /bsd|solaris/ ? "gmake" : "make"
27
27
  TAR_CMD = SOLARIS_32 ? 'gtar' : 'tar'
28
28
  PATCH_CMD = SOLARIS_32 ? 'gpatch' : 'patch'
29
29
 
@@ -119,6 +119,7 @@ Please note that when <tt>:no_block => true</tt>, update methods do not raise on
119
119
  # Marginally speed up settings access for hot paths
120
120
  @default_ttl = options[:default_ttl]
121
121
  @codec = options[:codec]
122
+ @support_cas = options[:support_cas]
122
123
 
123
124
  if servers == nil || servers == []
124
125
  if ENV.key?("MEMCACHE_SERVERS")
@@ -429,36 +430,30 @@ Please note that when <tt>:no_block => true</tt>, update methods do not raise on
429
430
  #
430
431
  # CAS stands for "compare and swap", and avoids the need for manual key mutexing. CAS support must be enabled in Memcached.new or a <b>Memcached::ClientError</b> will be raised. Note that CAS may be buggy in memcached itself.
431
432
  # :retry_on_exceptions does not apply to this method
432
- def cas(key, ttl=@default_ttl, encode=true, flags=FLAGS)
433
+ def cas(keys, ttl=@default_ttl, decode=true)
433
434
  raise ClientError, "CAS not enabled for this Memcached instance" unless options[:support_cas]
435
+ tries ||= 0
434
436
 
435
- begin
436
- value, flags, ret = Lib.memcached_get_rvalue(@struct, key)
437
- check_return_code(ret, key)
438
- rescue => e
439
- tries_for_get ||= 0
440
- raise unless tries_for_get < options[:exception_retry_limit] && should_retry(e)
441
- tries_for_get += 1
442
- retry
443
- end
444
-
445
- cas = @struct.result.cas
446
-
447
- value = @codec.decode(key, value, flags) if encode
448
- value = yield value
449
- value, flags = @codec.encode(key, value, flags) if encode
450
-
451
- begin
452
- check_return_code(
453
- Lib.memcached_cas(@struct, key, value, ttl, flags, cas),
454
- key
455
- )
456
- rescue => e
457
- tries_for_cas ||= 0
458
- raise unless tries_for_cas < options[:exception_retry_limit] && should_retry(e)
459
- tries_for_cas += 1
460
- retry
437
+ if keys.is_a? Array
438
+ # Multi CAS
439
+ hash, flags_and_cas = multi_get(keys, decode)
440
+ unless hash.empty?
441
+ hash = yield hash
442
+ # Only CAS entries that were updated from the original hash
443
+ hash.delete_if {|k, _| !flags_and_cas.has_key?(k) }
444
+ hash = multi_cas(hash, ttl, flags_and_cas, decode, tries)
445
+ end
446
+ hash
447
+ else
448
+ # Single CAS
449
+ value, flags, cas = single_get(keys, decode)
450
+ value = yield value
451
+ single_cas(keys, value, ttl, flags, cas, decode)
461
452
  end
453
+ rescue => e
454
+ raise unless tries < options[:exception_retry_limit] && should_retry(e)
455
+ tries += 1
456
+ retry
462
457
  end
463
458
 
464
459
  alias :compare_and_swap :cas
@@ -504,31 +499,9 @@ Please note that when <tt>:no_block => true</tt>, update methods do not raise on
504
499
  #
505
500
  def get(keys, decode=true)
506
501
  if keys.is_a? Array
507
- # Multi get
508
- ret = Lib.memcached_mget(@struct, keys);
509
- check_return_code(ret, keys)
510
-
511
- hash = {}
512
- value, key, flags, ret = Lib.memcached_fetch_rvalue(@struct)
513
- while ret != 21 do # Lib::MEMCACHED_END
514
- if ret == 0 # Lib::MEMCACHED_SUCCESS
515
- hash[key] = decode ? [value, flags] : value
516
- elsif ret != 16 # Lib::MEMCACHED_NOTFOUND
517
- check_return_code(ret, key)
518
- end
519
- value, key, flags, ret = Lib.memcached_fetch_rvalue(@struct)
520
- end
521
- if decode
522
- hash.each do |key, value_and_flags|
523
- hash[key] = @codec.decode(key, *value_and_flags)
524
- end
525
- end
526
- hash
502
+ multi_get(keys, decode).first
527
503
  else
528
- # Single get
529
- value, flags, ret = Lib.memcached_get_rvalue(@struct, keys)
530
- check_return_code(ret, keys)
531
- decode ? @codec.decode(keys, value, flags) : value
504
+ single_get(keys, decode).first
532
505
  end
533
506
  rescue => e
534
507
  tries ||= 0
@@ -694,4 +667,66 @@ Please note that when <tt>:no_block => true</tt>, update methods do not raise on
694
667
  end
695
668
  strings.join
696
669
  end
670
+
671
+ def single_get(key, decode)
672
+ value, flags, ret = Lib.memcached_get_rvalue(@struct, key)
673
+ check_return_code(ret, key)
674
+ cas = @struct.result.cas if @support_cas
675
+ value = @codec.decode(key, value, flags) if decode
676
+ [value, flags, cas]
677
+ end
678
+
679
+ def multi_get(keys, decode)
680
+ ret = Lib.memcached_mget(@struct, keys)
681
+ check_return_code(ret, keys)
682
+
683
+ hash = {}
684
+ flags_and_cas = {} if @support_cas
685
+ value, key, flags, ret = Lib.memcached_fetch_rvalue(@struct)
686
+ while ret != 21 do # Lib::MEMCACHED_END
687
+ if ret == 0 # Lib::MEMCACHED_SUCCESS
688
+ flags_and_cas[key] = [flags, @struct.result.cas] if @support_cas
689
+ hash[key] = decode ? [value, flags] : value
690
+ elsif ret != 16 # Lib::MEMCACHED_NOTFOUND
691
+ check_return_code(ret, key)
692
+ end
693
+ value, key, flags, ret = Lib.memcached_fetch_rvalue(@struct)
694
+ end
695
+ if decode
696
+ hash.each do |key, value_and_flags|
697
+ hash[key] = @codec.decode(key, *value_and_flags)
698
+ end
699
+ end
700
+ [hash, flags_and_cas]
701
+ end
702
+
703
+ def multi_cas(hash, ttl, flags_and_cas, encode, tries)
704
+ result = {}
705
+ hash.each do |key, value|
706
+ raw_value = value
707
+ flags, cas = flags_and_cas[key]
708
+ value, flags = @codec.encode(key, value, flags) if encode
709
+ begin
710
+ ret = Lib.memcached_cas(@struct, key, value, ttl, flags, cas)
711
+ if ret == 0 # Lib::MEMCACHED_SUCCESS
712
+ result[key] = raw_value
713
+ elsif ret != 12 && ret != 16 # Lib::MEMCACHED_DATA_EXISTS, Lib::MEMCACHED_NOTFOUND
714
+ check_return_code(ret, key)
715
+ end
716
+ rescue => e
717
+ raise unless tries < options[:exception_retry_limit] && should_retry(e)
718
+ tries += 1
719
+ retry
720
+ end
721
+ end
722
+ result
723
+ end
724
+
725
+ def single_cas(key, value, ttl, flags, cas, encode)
726
+ value, flags = @codec.encode(key, value, flags) if encode
727
+ check_return_code(
728
+ Lib.memcached_cas(@struct, key, value, ttl, flags, cas),
729
+ key
730
+ )
731
+ end
697
732
  end
@@ -165,7 +165,9 @@ class Memcached
165
165
  # Wraps Memcached#delete so that it doesn't raise.
166
166
  def delete(key, options = nil)
167
167
  super(key)
168
+ true
168
169
  rescue NotFound
170
+ false
169
171
  rescue Error => e
170
172
  log_exception e
171
173
  end
Binary file
@@ -1,3 +1,4 @@
1
+ Bundler.require(:benchmark)
1
2
 
2
3
  HERE = File.dirname(__FILE__)
3
4
  $LOAD_PATH << "#{HERE}/../../lib/"
@@ -1,4 +1,3 @@
1
-
2
1
  $LOAD_PATH << "#{File.dirname(__FILE__)}/../lib"
3
2
 
4
3
  require 'socket'
@@ -9,11 +8,11 @@ require 'ruby-debug' if ENV['DEBUG']
9
8
  require 'memcached'
10
9
 
11
10
  require 'test/unit'
11
+ require 'test/unit/assertions'
12
+ require 'mocha/test_unit'
12
13
  require 'ostruct'
13
- require 'mocha'
14
14
 
15
15
  UNIX_SOCKET_NAME = File.join(ENV['TMPDIR']||'/tmp','memcached') unless defined? UNIX_SOCKET_NAME
16
16
 
17
17
  class GenericClass
18
18
  end
19
-
@@ -1,4 +1,3 @@
1
-
2
1
  require File.expand_path("#{File.dirname(__FILE__)}/../test_helper")
3
2
 
4
3
  class MemcachedExperimentalTest < Test::Unit::TestCase
@@ -271,4 +270,3 @@ class MemcachedExperimentalTest < Test::Unit::TestCase
271
270
  end
272
271
 
273
272
  end
274
-
@@ -1,4 +1,3 @@
1
-
2
1
  require File.expand_path("#{File.dirname(__FILE__)}/../test_helper")
3
2
 
4
3
  class NilClass
@@ -49,6 +48,14 @@ class MemcachedTest < Test::Unit::TestCase
49
48
  :show_backtraces => true}
50
49
  @noblock_cache = Memcached.new(@servers, @noblock_options)
51
50
 
51
+ @cas_options = {
52
+ :prefix_key => @prefix_key,
53
+ :hash => :default,
54
+ :distribution => :modula,
55
+ :support_cas => true,
56
+ :show_backtraces => true}
57
+ @cas_cache = Memcached.new(@servers, @cas_options)
58
+
52
59
  @value = OpenStruct.new(:a => 1, :b => 2, :c => GenericClass)
53
60
  @marshalled_value = Marshal.dump(@value)
54
61
  end
@@ -302,7 +309,7 @@ class MemcachedTest < Test::Unit::TestCase
302
309
  result = cache.get key
303
310
  end
304
311
  end).real
305
-
312
+ ensure
306
313
  socket.close
307
314
  end
308
315
 
@@ -333,6 +340,7 @@ class MemcachedTest < Test::Unit::TestCase
333
340
  end
334
341
  end).real
335
342
 
343
+ ensure
336
344
  socket.close
337
345
  end
338
346
 
@@ -772,44 +780,150 @@ class MemcachedTest < Test::Unit::TestCase
772
780
  end
773
781
 
774
782
  def test_cas
775
- cache = Memcached.new(
776
- @servers,
777
- :prefix_key => @prefix_key,
778
- :support_cas => true
779
- )
780
783
  value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
781
784
 
782
785
  # Existing set
783
- cache.set key, @value
784
- cache.cas(key) do |current|
786
+ @cas_cache.set key, @value
787
+ @cas_cache.cas(key) do |current|
785
788
  assert_equal @value, current
786
789
  value2
787
790
  end
788
- assert_equal value2, cache.get(key)
791
+ assert_equal value2, @cas_cache.get(key)
789
792
 
790
793
  # Existing test without marshalling
791
- cache.set(key, "foo", 0, false)
792
- cache.cas(key, 0, false) do |current|
794
+ @cas_cache.set(key, "foo", 0, false)
795
+ @cas_cache.cas(key, 0, false) do |current|
793
796
  "#{current}bar"
794
797
  end
795
- assert_equal "foobar", cache.get(key, false)
798
+ assert_equal "foobar", @cas_cache.get(key, false)
796
799
 
797
800
  # Missing set
798
- cache.delete key
801
+ @cas_cache.delete key
799
802
  assert_raises(Memcached::NotFound) do
800
- cache.cas(key) {}
803
+ @cas_cache.cas(key) {}
801
804
  end
802
805
 
803
806
  # Conflicting set
804
- cache.set key, @value
807
+ @cas_cache.set key, @value
805
808
  assert_raises(Memcached::ConnectionDataExists) do
806
- cache.cas(key) do |current|
807
- cache.set key, value2
809
+ @cas_cache.cas(key) do |current|
810
+ @cas_cache.set key, value2
808
811
  current
809
812
  end
810
813
  end
811
814
  end
812
815
 
816
+ def test_multi_cas_with_empty_set
817
+ assert_raises Memcached::NotFound do
818
+ @cas_cache.cas([]) { flunk }
819
+ end
820
+ end
821
+
822
+ def test_multi_cas_with_existing_set
823
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
824
+
825
+ @cas_cache.set key, @value
826
+ result = @cas_cache.cas([key]) do |current|
827
+ assert_equal({key => @value}, current)
828
+ {key => value2}
829
+ end
830
+ assert_equal({key => value2}, result)
831
+ assert_equal value2, @cas_cache.get(key)
832
+ end
833
+
834
+ def test_multi_cas_with_different_key
835
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
836
+ key2 = "test_multi_cas"
837
+
838
+ @cas_cache.delete key2 rescue Memcached::NotFound
839
+ @cas_cache.set key, @value
840
+ result = @cas_cache.cas([key]) do |current|
841
+ assert_equal({key => @value}, current)
842
+ {key2 => value2}
843
+ end
844
+ assert_equal({}, result)
845
+ assert_equal @value, @cas_cache.get(key)
846
+ assert_raises(Memcached::NotFound) do
847
+ @cas_cache.get(key2)
848
+ end
849
+ end
850
+
851
+ def test_multi_cas_with_existing_multi_set
852
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
853
+ key2 = "test_multi_cas"
854
+
855
+ @cas_cache.set key, @value
856
+ @cas_cache.set key2, value2
857
+ result = @cas_cache.cas([key, key2]) do |current|
858
+ assert_equal({key => @value, key2 => value2}, current)
859
+ {key => value2}
860
+ end
861
+ assert_equal({key => value2}, result)
862
+ assert_equal value2, @cas_cache.get(key)
863
+ assert_equal value2, @cas_cache.get(key2)
864
+ end
865
+
866
+ def test_multi_cas_with_missing_set
867
+ key2 = "test_multi_cas"
868
+
869
+ @cas_cache.delete key rescue Memcached::NotFound
870
+ @cas_cache.delete key2 rescue Memcached::NotFound
871
+ assert_nothing_raised Memcached::NotFound do
872
+ assert_equal({}, @cas_cache.cas([key, key2]) { flunk })
873
+ end
874
+ end
875
+
876
+ def test_multi_cas_partial_fulfillment
877
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
878
+ key2 = "test_multi_cas"
879
+
880
+ @cas_cache.delete key rescue Memcached::NotFound
881
+ @cas_cache.set key2, value2
882
+ result = @cas_cache.cas([key, key2]) do |current|
883
+ assert_equal({key2 => value2}, current)
884
+ {key2 => @value}
885
+ end
886
+ assert_equal({key2 => @value}, result)
887
+ assert_raises Memcached::NotFound do
888
+ @cas_cache.get(key)
889
+ end
890
+ assert_equal @value, @cas_cache.get(key2)
891
+ end
892
+
893
+ def test_multi_cas_with_expiration
894
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
895
+ key2 = "test_multi_cas"
896
+
897
+ @cas_cache.set key, @value
898
+ @cas_cache.set key2, @value, 1
899
+ assert_nothing_raised do
900
+ result = @cas_cache.cas([key, key2]) do |current|
901
+ assert_equal({key => @value, key2 => @value}, current)
902
+ sleep 2
903
+ {key => value2, key2 => value2}
904
+ end
905
+ assert_equal({key => value2}, result)
906
+ end
907
+ end
908
+
909
+ def test_multi_cas_with_partial_conflict
910
+ value2 = OpenStruct.new(:d => 3, :e => 4, :f => GenericClass)
911
+ key2 = "test_multi_cas"
912
+
913
+ @cas_cache.set key, @value
914
+ @cas_cache.set key2, @value
915
+ assert_nothing_raised Memcached::ConnectionDataExists do
916
+ result = @cas_cache.cas([key, key2]) do |current|
917
+ assert_equal({key => @value, key2 => @value}, current)
918
+ @cas_cache.set key, value2
919
+ {key => @value, key2 => value2}
920
+ end
921
+ assert_equal({key2 => value2}, result)
922
+ end
923
+ assert_equal value2, @cas_cache.get(key)
924
+ assert_equal value2, @cas_cache.get(key2)
925
+ end
926
+
813
927
  # Error states
814
928
 
815
929
  def test_key_with_spaces
@@ -1063,6 +1177,7 @@ class MemcachedTest < Test::Unit::TestCase
1063
1177
  cache.set(key2, @value)
1064
1178
  end
1065
1179
 
1180
+ ensure
1066
1181
  socket.close
1067
1182
  end
1068
1183
 
@@ -1097,7 +1212,7 @@ class MemcachedTest < Test::Unit::TestCase
1097
1212
  cache.set(key2, @value)
1098
1213
  assert_equal cache.get(key2), @value
1099
1214
  end
1100
-
1215
+ ensure
1101
1216
  socket.close
1102
1217
  end
1103
1218
 
@@ -1141,7 +1256,7 @@ class MemcachedTest < Test::Unit::TestCase
1141
1256
  cache.set(key2, @value)
1142
1257
  assert_equal cache.get(key2), @value
1143
1258
  end
1144
-
1259
+ ensure
1145
1260
  socket.close
1146
1261
  end
1147
1262
 
@@ -1177,7 +1292,7 @@ class MemcachedTest < Test::Unit::TestCase
1177
1292
  assert_equal Memcached::ServerIsMarkedDead, e.class
1178
1293
  assert_match /localhost:43041/, e.message
1179
1294
  end
1180
-
1295
+ ensure
1181
1296
  socket.close
1182
1297
  end
1183
1298
 
@@ -1272,7 +1387,7 @@ class MemcachedTest < Test::Unit::TestCase
1272
1387
  exceptions = []
1273
1388
  100.times { begin; cache.set key, @value; rescue => e; exceptions << e; end }
1274
1389
  assert_equal failures, exceptions.map { |x| x.class }
1275
-
1390
+ ensure
1276
1391
  socket.close
1277
1392
  end
1278
1393
 
@@ -53,7 +53,7 @@ class RailsTest < Test::Unit::TestCase
53
53
  def test_delete_missing
54
54
  assert_nothing_raised do
55
55
  @cache.delete key
56
- assert_nil(@cache.delete(key))
56
+ assert !@cache.delete(key)
57
57
  end
58
58
  end
59
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcached
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -37,7 +37,7 @@ cert_chain:
37
37
  NXMyTndtMgp0NHVxTkY3c3dCV1MwbjQwL2htbjV1OHBUMkpWc3V3YW03OUdH
38
38
  aEptTmZDZFBDY0NiZ3Bocm9leFJjcndkVVJYCmx5MDBYZGYxZ0RWQnhSb1IK
39
39
  LS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
40
- date: 2013-11-08 00:00:00.000000000 Z
40
+ date: 2014-05-07 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
@@ -127,8 +127,6 @@ files:
127
127
  - TODO
128
128
  - ext/extconf-make.rb
129
129
  - ext/extconf.rb
130
- - ext/lib64/libmemcached.la
131
- - ext/lib64/pkgconfig/libmemcached.pc
132
130
  - ext/libmemcached-0.32/AUTHORS
133
131
  - ext/libmemcached-0.32/COPYING
134
132
  - ext/libmemcached-0.32/ChangeLog
metadata.gz.sig CHANGED
Binary file
@@ -1,41 +0,0 @@
1
- # libmemcached.la - a libtool library file
2
- # Generated by libtool (GNU libtool) 2.4
3
- #
4
- # Please DO NOT delete this file!
5
- # It is necessary for linking the library.
6
-
7
- # The name that we can dlopen(3).
8
- dlname=''
9
-
10
- # Names of this library.
11
- library_names=''
12
-
13
- # The name of the static archive.
14
- old_library='libmemcached.a'
15
-
16
- # Linker flags that can not go in dependency_libs.
17
- inherited_linker_flags=' '
18
-
19
- # Libraries that this one depends upon.
20
- dependency_libs=' -lsasl2 -L. -L/opt/local/lib -L/Users/eweaver/cloudburst/github/memcached/ext/lib64'
21
-
22
- # Names of additional weak libraries provided by this library
23
- weak_library_names=''
24
-
25
- # Version information for libmemcached.
26
- current=2
27
- age=0
28
- revision=0
29
-
30
- # Is this an already installed library?
31
- installed=yes
32
-
33
- # Should we warn about portability when linking against -modules?
34
- shouldnotlink=no
35
-
36
- # Files to dlopen/dlpreopen
37
- dlopen=''
38
- dlpreopen=''
39
-
40
- # Directory that this library needs to be installed in:
41
- libdir='/Users/eweaver/cloudburst/github/memcached/ext/lib64'
@@ -1,10 +0,0 @@
1
- prefix=/Users/eweaver/cloudburst/github/memcached/ext
2
- exec_prefix=${prefix}
3
- libdir=/Users/eweaver/cloudburst/github/memcached/ext/lib64
4
- includedir=${prefix}/include
5
-
6
- Name: libmemcached
7
- Description: libmemcached C library.
8
- Version: 0.32
9
- Libs: -L${libdir} -lmemcached
10
- Cflags: -I${includedir}