instance method read_multi_entries_from_local_cache

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

read_multi_entries_from_local_cache(names, options)

No documentation comment.

Parameters

names req
options req
Source
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 170
          def read_multi_entries_from_local_cache(names, options)
            keys_to_names = names.index_by { |name| normalize_key(name, options) }

            local_entries = local_cache.read_multi_entries(keys_to_names.keys)

            local_entries.each_with_object({}) do |(key, value), result|
              # If we recorded a miss in the local cache, the caller will forward
              # that key to the real store, and the entry will be replaced
              next if value.nil?

              entry = deserialize_entry(value, **options)

              normalized_key = keys_to_names[key]
              if entry.nil?
                result[normalized_key] = nil
              elsif entry.expired? || entry.mismatched?(normalize_version(normalized_key, options))
                local_cache.delete_entry(key)
              else
                result[normalized_key] = entry.value
              end
            end
          end

Defined in activesupport/lib/active_support/cache/strategy/local_cache.rb line 170 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Cache::Strategy::LocalCache

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close