instance method deserialize_entry

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

deserialize_entry(serialized_entry, raw:)

No documentation comment.

Parameters

serialized_entry req
raw keyreq
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close