dalli 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of dalli might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.md +19 -12
- data/README.md +8 -11
- data/lib/dalli/socket.rb +10 -1
- data/lib/dalli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fadd6651330b2d8455d781253451bd4e47d6caaaad9c12002284c6541727adb
|
4
|
+
data.tar.gz: ea65f2d7199c5dea247c2909ac90775240bd3da1ccfaebcebc916788a8b0ebf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368db20ef7ceb7a8301e8e027107ce90b238295f59aa8e1412f1e34a30a0e903ae56b6a07b2963eee0bc1a540fded0cacd3092a02f25ad1c17a21a05320baaf3
|
7
|
+
data.tar.gz: 32cc139bc122233910dddb62e1e3a6e1efec95e19d181dab04c8ced725806e238e1e6a62797cbbd8336e6e16b4a4a394c2f937bcaf8fffa63f66149d9f598e8c
|
data/History.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Dalli Changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
3.0.2
|
5
|
+
==========
|
6
|
+
|
7
|
+
- Restore Windows compatibility (petergoldstein)
|
8
|
+
- Add JRuby to CI and make requisite changes (petergoldstein)
|
9
|
+
- Clarify documentation for supported rubies (petergoldstein)
|
10
|
+
|
4
11
|
3.0.1
|
5
12
|
==========
|
6
13
|
|
@@ -11,18 +18,18 @@ Dalli Changelog
|
|
11
18
|
==========
|
12
19
|
- BREAKING CHANGES:
|
13
20
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
* Removes :dalli_store.
|
22
|
+
Use Rails' official :mem_cache_store instead.
|
23
|
+
https://guides.rubyonrails.org/caching_with_rails.html
|
24
|
+
* Attempting to store a larger value than allowed by memcached used to
|
25
|
+
print a warning and truncate the value. This now raises an error to
|
26
|
+
prevent silent data corruption.
|
27
|
+
* Compression now defaults to `true` for large values (greater than 4KB).
|
28
|
+
This is intended to minimize errors due to the previous note.
|
29
|
+
* Errors marshalling values now raise rather than just printing an error.
|
30
|
+
* The Rack session adapter has been refactored to remove support for thread-unsafe
|
31
|
+
configurations. You will need to include the `connection_pool` gem in
|
32
|
+
your Gemfile to ensure session operations are thread-safe.
|
26
33
|
|
27
34
|
- Raise NetworkError when multi response gets into corrupt state (mervync, #783)
|
28
35
|
- Validate servers argument (semaperepelitsa, petergoldstein, #776)
|
data/README.md
CHANGED
@@ -12,11 +12,10 @@ Dalli's initial development was sponsored by [CouchBase](http://www.couchbase.co
|
|
12
12
|
Supported Ruby versions and implementations
|
13
13
|
------------------------------------------------
|
14
14
|
|
15
|
-
Dalli
|
15
|
+
As of Dalli version 3.0 the following Ruby versions are supported:
|
16
16
|
|
17
|
-
*
|
18
|
-
*
|
19
|
-
* Rubinius 2.0
|
17
|
+
* Ruby 2.5.x, 2.6.x, 2.7.x, 3.0.x
|
18
|
+
* JRuby 9.2.x, 9.3.x
|
20
19
|
|
21
20
|
If you have problems, please enter an issue.
|
22
21
|
|
@@ -24,7 +23,7 @@ If you have problems, please enter an issue.
|
|
24
23
|
Installation and Usage
|
25
24
|
------------------------
|
26
25
|
|
27
|
-
Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install memcached
|
26
|
+
Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install the most recent version of memcached using Homebrew with
|
28
27
|
|
29
28
|
brew install memcached
|
30
29
|
|
@@ -40,7 +39,7 @@ gem install dalli
|
|
40
39
|
|
41
40
|
```ruby
|
42
41
|
require 'dalli'
|
43
|
-
options = { :
|
42
|
+
options = { namespace: "app_v1", compress: true }
|
44
43
|
dc = Dalli::Client.new('localhost:11211', options)
|
45
44
|
dc.set('abc', 123)
|
46
45
|
value = dc.get('abc')
|
@@ -52,10 +51,10 @@ require 'dalli'
|
|
52
51
|
ssl_context = OpenSSL::SSL::SSLContext.new
|
53
52
|
ssl_context.ca_file = "./myCA.pem"
|
54
53
|
ssl_context.ssl_version = :SSLv23
|
55
|
-
ssl_context.verify_hostname = true
|
54
|
+
ssl_context.verify_hostname = true if ssl_context.respond_to?(:verify_hostname=)
|
56
55
|
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
57
56
|
|
58
|
-
dc = Dalli::Client.new("memcached:11212", :
|
57
|
+
dc = Dalli::Client.new("memcached:11212", ssl_context: ssl_context)
|
59
58
|
dc.set("abc", 123)
|
60
59
|
value = dc.get("abc")
|
61
60
|
```
|
@@ -82,12 +81,10 @@ Dalli::Client accepts the following options. All times are in seconds.
|
|
82
81
|
**serializer**: The serializer to use for objects being stored (ex. JSON).
|
83
82
|
Default is Marshal.
|
84
83
|
|
85
|
-
**compress**: Boolean, if true Dalli will gzip-compress values larger than
|
84
|
+
**compress**: Boolean, if true Dalli will gzip-compress values larger than compression_min_size. Default is true.
|
86
85
|
|
87
86
|
**compression_min_size**: Minimum value byte size for which to attempt compression. Default is 1K.
|
88
87
|
|
89
|
-
**compression_max_size**: Maximum value byte size for which to attempt compression. Default is unlimited.
|
90
|
-
|
91
88
|
**compressor**: The compressor to use for objects being stored.
|
92
89
|
Default is zlib, implemented under `Dalli::Compressor`.
|
93
90
|
If serving compressed data using nginx's HttpMemcachedModule, set `memcached_gzip_flag 2` and use `Dalli::GzipCompressor`
|
data/lib/dalli/socket.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'openssl'
|
4
|
+
require 'rbconfig'
|
4
5
|
|
5
6
|
module Dalli
|
6
7
|
module Socket
|
@@ -77,8 +78,16 @@ module Dalli
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
end
|
81
|
+
end
|
80
82
|
|
81
|
-
|
83
|
+
if RbConfig::CONFIG['host_os'] =~ /mingw|mswin/
|
84
|
+
class Dalli::Socket::UNIX
|
85
|
+
def initialize(*args)
|
86
|
+
raise Dalli::DalliError, 'Unix sockets are not supported on Windows platform.'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
else
|
90
|
+
class Dalli::Socket::UNIX < UNIXSocket
|
82
91
|
include Dalli::Socket::InstanceMethods
|
83
92
|
attr_accessor :options, :server
|
84
93
|
|
data/lib/dalli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dalli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter M. Goldstein
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-10-
|
12
|
+
date: 2021-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|