diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2015-12-05 15:57:19 -0500 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2015-12-05 15:57:19 -0500 |
commit | edc3deb9f1035811dfa6b4fedfaa18a0654c7018 (patch) | |
tree | c3a6eb5679393738b4f5605388407b66dfea25ab /activesupport/lib | |
parent | d08033f9b50bddd1bbad8818541cff0f67bcc260 (diff) | |
parent | 8c3bdb757838f86117fc83f24f8c4290d22a71d5 (diff) | |
download | rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.tar.gz rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.tar.bz2 rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.zip |
Merge pull request #22202 from grosser/grosser/write-consistent
even if a write fails, store the raw value
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 36f1ba2713..174913365a 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -36,13 +36,13 @@ module ActiveSupport end def write_entry(key, entry, options) # :nodoc: - retval = super - if options[:raw] && local_cache && retval + if options[:raw] && local_cache raw_entry = Entry.new(entry.value.to_s) raw_entry.expires_at = entry.expires_at - local_cache.write_entry(key, raw_entry, options) + super(key, raw_entry, options) + else + super end - retval end end |