aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-07-11 04:54:28 -0700
committerJosé Valim <jose.valim@gmail.com>2011-07-11 04:54:28 -0700
commit8f2e32158bb2e5a0a762861b085c0880320f315e (patch)
treeef38041398123a3d0de3a4d721d3182026911fad /activesupport/lib/active_support/cache
parente9f9ce971e17bcdc0cf74af926fdeacea56504a3 (diff)
parentc2aacdf2eb833bc16b71530732bded1c8c7ef6f6 (diff)
downloadrails-8f2e32158bb2e5a0a762861b085c0880320f315e.tar.gz
rails-8f2e32158bb2e5a0a762861b085c0880320f315e.tar.bz2
rails-8f2e32158bb2e5a0a762861b085c0880320f315e.zip
Merge pull request #1608 from sishen/sishen
MemcacheStore: deserialize the entry reading from local_cache when using
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index 64d2c3bff6..e07294178b 100644
--- a/activesupport/lib/active_support/cache/mem_cache_store.rb
+++ b/activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -183,6 +183,14 @@ module ActiveSupport
# Provide support for raw values in the local cache strategy.
module LocalCacheWithRaw # :nodoc:
protected
+ def read_entry(key, options)
+ entry = super
+ if options[:raw] && local_cache && entry
+ entry = deserialize_entry(entry.value)
+ end
+ entry
+ end
+
def write_entry(key, entry, options) # :nodoc:
retval = super
if options[:raw] && local_cache && retval