class ActiveSupport::Cache::Coder::LazyEntry
def initialize(serializer, compressor, payload, **options)
def initialize(serializer, compressor, payload, **options) super(payload, **options) @serializer = serializer @compressor = compressor @resolved = false end
def mismatched?(version)
def mismatched?(version) super.tap { |mismatched| value if !mismatched } rescue Cache::DeserializationError true end
def value
def value if !@resolved @value = @serializer.load(@compressor ? @compressor.inflate(@value) : @value) @resolved = true end @value end