Flowdock
method

read_multi_entries

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: RedisCacheStore
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/redis_cache_store.rb, line 324
        def read_multi_entries(names, **options)
          options = merged_options(options)
          return {} if names == []
          raw = options&.fetch(:raw, false)

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

          values = failsafe(:read_multi_entries, returning: {}) do
            redis.then { |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))
                begin
                  results[name] = entry.value
                rescue DeserializationError
                end
              end
            end
          end
        end
Register or log in to add new notes.