memcache 1.2.11 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/memcache.rb +11 -5
- data/memcache.gemspec +2 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/memcache.rb
CHANGED
@@ -124,8 +124,13 @@ class Memcache
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
|
-
def read(
|
128
|
-
|
127
|
+
def read(key, opts = nil)
|
128
|
+
opts ||= {}
|
129
|
+
get(key, opts.merge(:raw => true))
|
130
|
+
end
|
131
|
+
|
132
|
+
def read_multi(*keys)
|
133
|
+
get(keys)
|
129
134
|
end
|
130
135
|
|
131
136
|
def set(key, value, opts = {})
|
@@ -140,7 +145,8 @@ class Memcache
|
|
140
145
|
value
|
141
146
|
end
|
142
147
|
|
143
|
-
def write(key, value, opts =
|
148
|
+
def write(key, value, opts = nil)
|
149
|
+
opts ||= {}
|
144
150
|
set(key, value, opts.merge(:raw => true))
|
145
151
|
end
|
146
152
|
|
@@ -253,10 +259,10 @@ class Memcache
|
|
253
259
|
end
|
254
260
|
|
255
261
|
keys_to_fetch = keys - records.keys
|
256
|
-
method = opts[:overwrite] ? :set : :
|
262
|
+
method = opts[:overwrite] ? :set : :add
|
257
263
|
if keys_to_fetch.any?
|
258
264
|
yield(keys_to_fetch).each do |key, value|
|
259
|
-
|
265
|
+
self.send(method, key, value, opts) unless opts[:disable] or opts[:disable_write]
|
260
266
|
records[key] = value
|
261
267
|
end
|
262
268
|
end
|
data/memcache.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{memcache}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Balthrop"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-05-10}
|
13
13
|
s.description = %q{Ruby client for memcached supporting advanced protocol features and pluggable architecture.}
|
14
14
|
s.email = %q{code@justinbalthrop.com}
|
15
15
|
s.extensions = ["ext/extconf.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memcache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Balthrop
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-05-10 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|