方法
- M
- N
- V
类公共方法
new(serializer, compressor, payload, **options) 链接
来源: 显示 | 在 GitHub 上
# File activesupport/lib/active_support/cache/coder.rb, line 99 def initialize(serializer, compressor, payload, **options) super(payload, **options) @serializer = serializer @compressor = compressor @resolved = false end
实例公共方法
mismatched?(version) 链接
来源: 显示 | 在 GitHub 上
# File activesupport/lib/active_support/cache/coder.rb, line 114 def mismatched?(version) super.tap { |mismatched| value if !mismatched } rescue Cache::DeserializationError true end
value() 链接
来源: 显示 | 在 GitHub 上
# File activesupport/lib/active_support/cache/coder.rb, line 106 def value if !@resolved @value = @serializer.load(@compressor ? @compressor.inflate(@value) : @value) @resolved = true end @value end