提交 15125e09 编写于 作者: J Jeremy Kemper

Merge pull request #7812 from bdurand/optimize_cache_entry_take_2

fix broken cache tests
......@@ -591,9 +591,9 @@ def size
when NilClass
0
when String
value.bytesize
@v.bytesize
else
@s = Marshal.dump(value).bytesize
@s = Marshal.dump(@v).bytesize
end
end
end
......
......@@ -616,7 +616,7 @@ def test_log_exception_when_cache_read_fails
class MemoryStoreTest < ActiveSupport::TestCase
def setup
@record_size = Marshal.dump("aaaaaaaaaa").bytesize
@record_size = ActiveSupport::Cache::Entry.new("aaaaaaaaaa").size
@cache = ActiveSupport::Cache.lookup_store(:memory_store, :expires_in => 60, :size => @record_size * 10)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册