Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RedisCacheStore #write_multi to correctly store entries #31886

Closed
wants to merge 1 commit into from

Conversation

fatkodima
Copy link
Member

@fatkodima fatkodima commented Feb 4, 2018

Fixes #31884.

Before, values were incorrectly stored as strings like
"#<ActiveSupport::Cache::Entry:0x007fd63671af48>". So now they are stored correctly.

I created a test with explicit expires_in as nil to test this code path

if mset_capable? && expires_in.nil?
failsafe :write_multi_entries do
redis.mapped_mset(entries)
end
which was always avoided before by tests, because of expires_in here
@cache = ActiveSupport::Cache::RedisCacheStore.new(timeout: 0.1, namespace: @namespace, expires_in: 60, driver: DRIVER)

@rails-bot
Copy link

r? @schneems

(@rails-bot has picked a reviewer for you, use r? to override)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants