dalli 3.2.6 → 3.2.7
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/dalli/pipelined_getter.rb +1 -1
- data/lib/dalli/socket.rb +22 -3
- data/lib/dalli/version.rb +1 -1
- data/lib/dalli.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a98f25c5f6f750d72b83fdd0b6e45a9d693520a91b9b7d985bd26fd0abfac41e
|
|
4
|
+
data.tar.gz: 9e95098e69ece841757034d69cc2091e0b450feed17290bf5fffd527e6d45ac7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25368bee67a5fd00aa7795cc06839c366fb7c1c33386ca0304c1cdfee3a4c82729716128d8f452cb7e0c0e2c24e2c3aec384eb7e3e0ee68c3915d93e17917456
|
|
7
|
+
data.tar.gz: f0094059b3e7430b3b03a0a6d8795ba0e76bdf1622ba2531b3ceffa11ebb3fb2442a4512a5c98e27e00fba253a7241fb58f47e3f93c58944676c8cd5d0dfe123
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ Dalli Changelog
|
|
|
4
4
|
Unreleased
|
|
5
5
|
==========
|
|
6
6
|
|
|
7
|
+
3.2.7
|
|
8
|
+
==========
|
|
9
|
+
|
|
10
|
+
- Fix cascading error when there's an underlying network error in a pipelined get (eugeneius)
|
|
11
|
+
- Ruby 3.4/head compatibility by adding base64 to gemspec (tagliala)
|
|
12
|
+
- Add Ruby 3.3 to CI (m-nakamura145)
|
|
13
|
+
- Use Socket's connect_timeout when available, and pass timeout to the socket's send and receive timeouts (mlarraz)
|
|
14
|
+
|
|
7
15
|
3.2.6
|
|
8
16
|
==========
|
|
9
17
|
|
data/lib/dalli/socket.rb
CHANGED
|
@@ -88,14 +88,24 @@ module Dalli
|
|
|
88
88
|
# options - supports enhanced logging in the case of a timeout
|
|
89
89
|
attr_accessor :options
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
sock = new(host, port)
|
|
91
|
+
if RUBY_VERSION >= '3.0'
|
|
92
|
+
def self.open(host, port, options = {})
|
|
93
|
+
sock = new(host, port, connect_timeout: options[:socket_timeout])
|
|
94
94
|
sock.options = { host: host, port: port }.merge(options)
|
|
95
95
|
init_socket_options(sock, options)
|
|
96
96
|
|
|
97
97
|
options[:ssl_context] ? wrapping_ssl_socket(sock, host, options[:ssl_context]) : sock
|
|
98
98
|
end
|
|
99
|
+
else
|
|
100
|
+
def self.open(host, port, options = {})
|
|
101
|
+
Timeout.timeout(options[:socket_timeout]) do
|
|
102
|
+
sock = new(host, port)
|
|
103
|
+
sock.options = { host: host, port: port }.merge(options)
|
|
104
|
+
init_socket_options(sock, options)
|
|
105
|
+
|
|
106
|
+
options[:ssl_context] ? wrapping_ssl_socket(sock, host, options[:ssl_context]) : sock
|
|
107
|
+
end
|
|
108
|
+
end
|
|
99
109
|
end
|
|
100
110
|
|
|
101
111
|
def self.init_socket_options(sock, options)
|
|
@@ -103,6 +113,15 @@ module Dalli
|
|
|
103
113
|
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_KEEPALIVE, true) if options[:keepalive]
|
|
104
114
|
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_RCVBUF, options[:rcvbuf]) if options[:rcvbuf]
|
|
105
115
|
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_SNDBUF, options[:sndbuf]) if options[:sndbuf]
|
|
116
|
+
|
|
117
|
+
return unless options[:socket_timeout]
|
|
118
|
+
|
|
119
|
+
seconds, fractional = options[:socket_timeout].divmod(1)
|
|
120
|
+
microseconds = fractional * 1_000_000
|
|
121
|
+
timeval = [seconds, microseconds].pack('l_2')
|
|
122
|
+
|
|
123
|
+
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_RCVTIMEO, timeval)
|
|
124
|
+
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_SNDTIMEO, timeval)
|
|
106
125
|
end
|
|
107
126
|
|
|
108
127
|
def self.wrapping_ssl_socket(tcp_socket, host, ssl_context)
|
data/lib/dalli/version.rb
CHANGED
data/lib/dalli.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.2.
|
|
4
|
+
version: 3.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter M. Goldstein
|
|
@@ -9,8 +9,22 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
13
|
-
dependencies:
|
|
12
|
+
date: 2024-01-28 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: base64
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
requirements:
|
|
18
|
+
- - ">="
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: '0'
|
|
21
|
+
type: :runtime
|
|
22
|
+
prerelease: false
|
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
+
requirements:
|
|
25
|
+
- - ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: '0'
|
|
14
28
|
description: High performance memcached client for Ruby
|
|
15
29
|
email:
|
|
16
30
|
- peter.m.goldstein@gmail.com
|
|
@@ -75,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
75
89
|
- !ruby/object:Gem::Version
|
|
76
90
|
version: '0'
|
|
77
91
|
requirements: []
|
|
78
|
-
rubygems_version: 3.
|
|
92
|
+
rubygems_version: 3.5.5
|
|
79
93
|
signing_key:
|
|
80
94
|
specification_version: 4
|
|
81
95
|
summary: High performance memcached client for Ruby
|