instance method
deserialize_entry
Ruby on Rails 5.2.8.1
Since v5.2.8.1 PrivateSignature
deserialize_entry(serialized_entry, raw:)
No documentation comment.
Parameters
-
serialized_entryreq -
rawkeyreq
Source
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 418
def deserialize_entry(serialized_entry, raw:)
if serialized_entry
entry = Marshal.load(serialized_entry) rescue serialized_entry
written_raw = serialized_entry.equal?(entry)
if raw != written_raw
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using a different value for the raw option when reading and writing
to a cache key is deprecated for :redis_cache_store and Rails 6.0
will stop automatically detecting the format when reading to avoid
marshal loading untrusted raw strings.
MSG
end
entry.is_a?(Entry) ? entry : Entry.new(entry)
end
end
Defined in activesupport/lib/active_support/cache/redis_cache_store.rb line 418
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::RedisCacheStore