instance method read_multi_mget

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v7.0.10 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10

Signature

read_multi_mget(*names)

No documentation comment.

Parameters

names rest
Source
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 336
        def read_multi_mget(*names)
          options = names.extract_options!
          options = merged_options(options)
          raw = options && options.fetch(:raw, false)

          keys = names.map { |name| normalize_key(name, options) }

          values = failsafe(:read_multi_mget, returning: {}) do
            redis.with { |c| c.mget(*keys) }
          end

          names.zip(values).each_with_object({}) do |(name, value), results|
            if value
              entry = deserialize_entry(value, raw: raw)
              unless entry.nil? || entry.expired? || entry.mismatched?(normalize_version(name, options))
                results[name] = entry.value
              end
            end
          end
        end

Defined in activesupport/lib/active_support/cache/redis_cache_store.rb line 336 · 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