Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Drop expires argument from call to @data in MemCacheStore so it works…

… with memcache-client and memcached gems, as advertised [#3672 state:resolved]

Signed-off-by: wycats <wycats@gmail.com>
  • Loading branch information...
commit edaf92f5ab4b44e789e526dfa8b93cb370e595cf 1 parent b0967cc
@vandrijevik vandrijevik authored wycats committed
View
2  activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -91,7 +91,7 @@ def write(key, value, options = nil)
def delete(key, options = nil) # :nodoc:
super do
- response = @data.delete(key, expires_in(options))
+ response = @data.delete(key)
response == Response::DELETED
end
rescue MemCache::MemCacheError => e
View
6 activesupport/test/caching_test.rb
@@ -333,6 +333,12 @@ def test_expires_in_with_invalid_value
assert_equal 'bat', @cache.read('baz')
assert_equal nil, @cache.read('foo')
end
+
+ def test_delete_should_only_pass_key_to_data
+ key = 'foo'
+ @data.expects(:delete).with(key)
+ @cache.delete(key)
+ end
end
class CompressedMemCacheStore < ActiveSupport::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.