memcached 0.19.7 → 0.19.8

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v0.19.8. Support :noreply behavior.
3
+
2
4
  v0.19.7. Add no block prepend and append support for the ASCII protocol (rgbenson).
3
5
 
4
6
  v0.19.6. Add get_from_last.
@@ -8,6 +8,7 @@ class Memcached
8
8
  DEFAULTS = {
9
9
  :hash => :fnv1_32,
10
10
  :no_block => false,
11
+ :noreply => false,
11
12
  :distribution => :consistent_ketama,
12
13
  :ketama_weighted => true,
13
14
  :buffer_requests => false,
@@ -79,8 +80,9 @@ Valid option parameters are:
79
80
  <tt>:cache_lookups</tt>:: Whether to cache hostname lookups for the life of the instance. Defaults to <tt>true</tt>.
80
81
  <tt>:support_cas</tt>:: Flag CAS support in the client. Accepts <tt>true</tt> or <tt>false</tt>. Defaults to <tt>false</tt> because it imposes a slight performance penalty. Note that your server must also support CAS or you will trigger <b>ProtocolError</b> exceptions.
81
82
  <tt>:tcp_nodelay</tt>:: Turns on the no-delay feature for connecting sockets. Accepts <tt>true</tt> or <tt>false</tt>. Performance may or may not change, depending on your system.
82
- <tt>:no_block</tt>:: Whether to use pipelining for writes. Accepts <tt>true</tt> or <tt>false</tt>.
83
- <tt>:buffer_requests</tt>:: Whether to use an internal write buffer. Accepts <tt>true</tt> or <tt>false</tt>. Calling <tt>get</tt> or closing the connection will force the buffer to flush. Note that <tt>:buffer_requests</tt> might not work well without <tt>:no_block</tt> also enabled.
83
+ <tt>:no_block</tt>:: Whether to use pipelining for writes. Defaults to <tt>false</tt>.
84
+ <tt>:buffer_requests</tt>:: Whether to use an internal write buffer. Accepts <tt>true</tt> or <tt>false</tt>. Calling <tt>get</tt> or closing the connection will force the buffer to flush. Client behavior is undefined unless <tt>:no_block</tt> is enabled. Defaults to <tt>false</tt>.
85
+ <tt>:noreply</tt>:: Ask server not to reply for storage commands. Client behavior is undefined unless <tt>:no_block</tt> and <tt>:buffer_requests</tt> are enabled. Defaults to <tt>false</tt>.
84
86
  <tt>:show_backtraces</tt>:: Whether <b>NotFound</b> and <b>NotStored</b> exceptions should include backtraces. Generating backtraces is slow, so this is off by default. Turn it on to ease debugging.
85
87
  <tt>:connect_timeout</tt>:: How long to wait for a connection to a server. Defaults to 2 seconds. Set to <tt>0</tt> if you want to wait forever.
86
88
  <tt>:timeout</tt>:: How long to wait for a response from the server. Defaults to 0.25 seconds. Set to <tt>0</tt> if you want to wait forever.
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{memcached}
5
- s.version = "0.19.7"
5
+ s.version = "0.19.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
9
  s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2010-06-18}
10
+ s.date = %q{2010-07-03}
11
11
  s.description = %q{An interface to the libmemcached C client.}
12
12
  s.email = %q{}
13
13
  s.extensions = ["ext/extconf.rb"]
@@ -37,6 +37,7 @@ class MemcachedTest < Test::Unit::TestCase
37
37
  @noblock_options = {
38
38
  :prefix_key => @prefix_key,
39
39
  :no_block => true,
40
+ :noreply => true,
40
41
  :buffer_requests => true,
41
42
  :hash => :default,
42
43
  :distribution => :modula}
@@ -861,16 +862,21 @@ class MemcachedTest < Test::Unit::TestCase
861
862
  end
862
863
 
863
864
  def test_no_block_set_object_too_large
865
+ noblock_cache = Memcached.new(@servers, @noblock_options.merge(:noreply => false))
864
866
  assert_nothing_raised do
867
+ noblock_cache.set key, "I'm big" * 1000000
868
+ end
869
+ assert_raise( Memcached::ServerIsMarkedDead) do
865
870
  @noblock_cache.set key, "I'm big" * 1000000
866
871
  end
867
872
  end
868
873
 
869
874
  def test_no_block_existing_add
870
875
  # Should still raise
871
- @noblock_cache.set key, @value
876
+ noblock_cache = Memcached.new(@servers, @noblock_options.merge(:noreply => false))
877
+ noblock_cache.set key, @value
872
878
  assert_raise(Memcached::NotStored) do
873
- @noblock_cache.add key, @value
879
+ noblock_cache.add key, @value
874
880
  end
875
881
  end
876
882
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 19
8
- - 7
9
- version: 0.19.7
8
+ - 8
9
+ version: 0.19.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Evan Weaver
@@ -35,7 +35,7 @@ cert_chain:
35
35
  yZ0=
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2010-06-18 00:00:00 -07:00
38
+ date: 2010-07-03 00:00:00 -07:00
39
39
  default_executable:
40
40
  dependencies: []
41
41
 
metadata.gz.sig CHANGED
Binary file