Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions activesupport/lib/active_support/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Cache
:race_condition_ttl,
:serializer,
:skip_nil,
:raw,
]

# Mapping of canonical option names to aliases that a store will recognize.
Expand Down
6 changes: 6 additions & 0 deletions activesupport/test/cache/behaviors/cache_store_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,12 @@ def test_setting_options_in_fetch_block_does_not_change_cache_options
end
end

def test_configuring_store_with_raw
cache = lookup_store(raw: true)
cache.write("foo", "bar")
assert_equal "bar", cache.read("foo")
end

private
def with_raise_on_invalid_cache_expiration_time(new_value, &block)
old_value = ActiveSupport::Cache::Store.raise_on_invalid_cache_expiration_time
Expand Down