aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2015-11-06 08:46:21 -0800
committerMichael Grosser <michael@grosser.it>2015-11-29 20:54:09 -0800
commit8c3bdb757838f86117fc83f24f8c4290d22a71d5 (patch)
tree6687b438ef307851fa44a89c6b3132672fff0028 /activesupport/lib/active_support/cache
parent312485f3e88af3966b586275ae5097198bfef6a0 (diff)
downloadrails-8c3bdb757838f86117fc83f24f8c4290d22a71d5.tar.gz
rails-8c3bdb757838f86117fc83f24f8c4290d22a71d5.tar.bz2
rails-8c3bdb757838f86117fc83f24f8c4290d22a71d5.zip
even if a write fails, store the raw value
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb8
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 4b0ad37586..46110b09da 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