spymemcached 0.1.0-java → 0.1.2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,7 @@ Or with bundler:
12
12
 
13
13
  = How to use the cache store
14
14
 
15
+ require "active_support/cache/spymemcached_store" # you need to do this if you're running rails in threadsafe mode.
15
16
  config.cache_store :spymemcached_store, "memcache01:11211", "memcached02:11211", ...
16
17
 
17
18
  = Or use the client directly:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.2
@@ -23,7 +23,7 @@ module ActiveSupport
23
23
  def write(key, value, options = nil)
24
24
  super
25
25
  method = unless_exist?(options) ? :add : :set
26
- @cache.send(method, key, value, expiry(options))
26
+ @cache.send(method, key, value, expiry(options).to_i)
27
27
  end
28
28
 
29
29
  def delete(key, options = nil)
@@ -59,4 +59,8 @@ describe "SpymemcachedStore" do
59
59
  @cache.decrement("a", 2)
60
60
  @cache.read("a").should == "0"
61
61
  end
62
+
63
+ it "supports :expires_in with a duration argument" do
64
+ lambda { @cache.write("a", "2", :expires_in => 1.hour) }.should_not raise_error
65
+ end
62
66
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{spymemcached}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.2"
9
9
  s.platform = %q{java}
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: java
11
11
  authors:
12
12
  - James Golick