diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-17 17:32:52 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-17 17:33:17 -0400 |
commit | 324f1451b06c82242426b1a239b0559181b16c37 (patch) | |
tree | ddcee1d830ad340319764ffd1c2abfbb9606d81d /actionpack/lib/action_dispatch/http/rack_cache.rb | |
parent | b77e032ccf50249685c672c2d75f173db2ee2dbf (diff) | |
download | rails-324f1451b06c82242426b1a239b0559181b16c37.tar.gz rails-324f1451b06c82242426b1a239b0559181b16c37.tar.bz2 rails-324f1451b06c82242426b1a239b0559181b16c37.zip |
Dump and load rack-cache stuff.
Diffstat (limited to 'actionpack/lib/action_dispatch/http/rack_cache.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/rack_cache.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/rack_cache.rb b/actionpack/lib/action_dispatch/http/rack_cache.rb index b5c1435903..cc8edee300 100644 --- a/actionpack/lib/action_dispatch/http/rack_cache.rb +++ b/actionpack/lib/action_dispatch/http/rack_cache.rb @@ -14,11 +14,15 @@ module ActionDispatch end def read(key) - @store.read(key) || [] + if data = @store.read(key) + Marshal.load(data) + else + [] + end end def write(key, value) - @store.write(key, value) + @store.write(key, Marshal.dump(value)) end ::Rack::Cache::MetaStore::RAILS = self |