123456789_123456789_123456789_123456789_123456789_

Module: ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Defined in: activesupport/lib/active_support/cache/serializer_with_fallback.rb

Constant Summary

::ActiveSupport::Cache::SerializerWithFallback - Included

SERIALIZERS

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#available?Boolean (readonly, private)

[ GitHub ]

  
# File 'activesupport/lib/active_support/cache/serializer_with_fallback.rb', line 135

def available?
  return @available if defined?(@available)
  silence_warnings { require "active_support/message_pack" }
  @available = true
rescue LoadError
  @available = false
end

Instance Method Details

#_load(dumped)

[ GitHub ]

  
# File 'activesupport/lib/active_support/cache/serializer_with_fallback.rb', line 126

def _load(dumped)
  ActiveSupport::MessagePack::CacheSerializer.load(dumped)
end

#dump(value)

[ GitHub ]

  
# File 'activesupport/lib/active_support/cache/serializer_with_fallback.rb', line 122

def dump(value)
  ActiveSupport::MessagePack::CacheSerializer.dump(value)
end

#dumped?(dumped) ⇒ Boolean

[ GitHub ]

  
# File 'activesupport/lib/active_support/cache/serializer_with_fallback.rb', line 130

def dumped?(dumped)
  available? && ActiveSupport::MessagePack.signature?(dumped)
end