Flowdock
method

read_multi_entries

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ActiveSupport::Cache::Strategy::LocalCache
read_multi_entries(names, **options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 134
          def read_multi_entries(names, **options)
            return super unless local_cache

            keys_to_names = names.index_by { |name| normalize_key(name, options) }

            local_entries = local_cache.read_multi_entries(keys_to_names.keys)
            local_entries.transform_keys! { |key| keys_to_names[key] }
            local_entries.transform_values! do |payload|
              deserialize_entry(payload, **options)&.value
            end
            missed_names = names - local_entries.keys

            if missed_names.any?
              local_entries.merge!(super(missed_names, **options))
            else
              local_entries
            end
          end
Register or log in to add new notes.