diff options
author | Dingding Ye <yedingding@gmail.com> | 2011-06-10 01:15:37 +0800 |
---|---|---|
committer | Dingding Ye <yedingding@gmail.com> | 2011-06-10 01:15:37 +0800 |
commit | c2aacdf2eb833bc16b71530732bded1c8c7ef6f6 (patch) | |
tree | adc0dbdd97927a2fc8dcd72421f872d8d986591d /activesupport/lib | |
parent | 834bebf9cc5acbf2c6662d1e5458a2726d305341 (diff) | |
download | rails-c2aacdf2eb833bc16b71530732bded1c8c7ef6f6.tar.gz rails-c2aacdf2eb833bc16b71530732bded1c8c7ef6f6.tar.bz2 rails-c2aacdf2eb833bc16b71530732bded1c8c7ef6f6.zip |
MemcacheStore: deserialize the entry reading from local_cache when using raw
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 8 |
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 |