From 324f1451b06c82242426b1a239b0559181b16c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 17 May 2011 17:32:52 -0400 Subject: Dump and load rack-cache stuff. --- actionpack/lib/action_dispatch/http/rack_cache.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3