hybrid_memcache 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hybrid_memcache}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Knopp"]
12
- s.date = %q{2010-02-18}
12
+ s.date = %q{2010-03-01}
13
13
  s.description = %q{the summary says it all.}
14
14
  s.email = %q{mknopp@yammer-inc.com}
15
15
  s.extra_rdoc_files = [
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.homepage = %q{http://github.com/mhat/hybrid_memcache}
34
34
  s.rdoc_options = ["--charset=UTF-8"]
35
35
  s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.5}
36
+ s.rubygems_version = %q{1.3.6}
37
37
  s.summary = %q{ninjudd-memcached compatible interface to fauna-memcached}
38
38
  s.test_files = [
39
39
  "test/helper.rb",
@@ -86,7 +86,7 @@ class Memcache < Memcached
86
86
  value, flags, ret = Lib.memcached_get_rvalue(@struct, normalize_keys(keys))
87
87
 
88
88
  ## ninjudd-memcache treats broken servers as cache missis, so return nil
89
- check_return_code(ret, keys)
89
+ ## check_return_code(ret, keys)
90
90
  return nil unless ret == 0
91
91
 
92
92
  if marshal
@@ -114,7 +114,7 @@ class Memcache < Memcached
114
114
  ret = Lib.memcached_mget(@struct, normalized)
115
115
 
116
116
  ## once again: potentiall braken server == cache miss
117
- check_return_code(ret, normalized)
117
+ ## check_return_code(ret, normalized)
118
118
  return {} unless ret == 0
119
119
 
120
120
  hash = {}
@@ -123,14 +123,19 @@ class Memcache < Memcached
123
123
  if ret == Lib::MEMCACHED_END
124
124
  break
125
125
  end
126
- check_return_code(ret, key)
127
126
 
128
- # Assign the value
129
- if marshal
130
- value = Marshal.load(value)
131
- end
132
- value.memcache_cas = cas ? @struct.result.cas : false
133
- value.memcache_flags = flags
127
+ if ret != 0
128
+ ## once again: potentiall braken server == cache miss
129
+ ## check_return_code(ret, key)
130
+ value = nil
131
+ else
132
+ # Assign the value
133
+ if marshal
134
+ value = Marshal.load(value)
135
+ end
136
+ value.memcache_cas = cas ? @struct.result.cas : false
137
+ value.memcache_flags = flags
138
+ end
134
139
 
135
140
  hash[ norm_to_std[key] ] = value
136
141
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybrid_memcache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Matthew Knopp
@@ -9,19 +14,23 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-18 00:00:00 -08:00
17
+ date: 2010-03-01 00:00:00 -08:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: memcached
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 18
30
+ - 0
23
31
  version: 0.18.0
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  description: the summary says it all.
26
35
  email: mknopp@yammer-inc.com
27
36
  executables: []
@@ -57,18 +66,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
66
  requirements:
58
67
  - - ">="
59
68
  - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
60
71
  version: "0"
61
- version:
62
72
  required_rubygems_version: !ruby/object:Gem::Requirement
63
73
  requirements:
64
74
  - - ">="
65
75
  - !ruby/object:Gem::Version
76
+ segments:
77
+ - 0
66
78
  version: "0"
67
- version:
68
79
  requirements: []
69
80
 
70
81
  rubyforge_project:
71
- rubygems_version: 1.3.5
82
+ rubygems_version: 1.3.6
72
83
  signing_key:
73
84
  specification_version: 3
74
85
  summary: ninjudd-memcached compatible interface to fauna-memcached