mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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>
This commit is contained in:
parent
b0967cc5cf
commit
edaf92f5ab
2 changed files with 7 additions and 1 deletions
|
@ -91,7 +91,7 @@ module ActiveSupport
|
|||
|
||||
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
|
||||
|
|
|
@ -333,6 +333,12 @@ uses_memcached 'memcached backed store' do
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue