Skip to content

Rails read_multi call takes parameter list not an array #1

@tomfakes

Description

@tomfakes

Hey Nate, I just added this to project of mine, and found a small bug.

The Rails.cache.read_multi() call actually takes a list of parameters, not an array. The Dalli cache store that I'm using then fails to return any results.

The easy fix is to splat the keys array:

result_hash = Rails.cache.read_multi(*(keys_to_collection_map.keys))

Then it works like a champ!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions