blob: 9470ac9f66977c9dc90572a96761a8491ae0553d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
module ActiveSupport
module Cache
class CompressedMemCacheStore < MemCacheStore
def read(name, options = {})
if value = super(name, options.merge(:raw => true))
Marshal.load(ActiveSupport::Gzip.decompress(value))
end
end
def write(name, value, options = {})
super(name, ActiveSupport::Gzip.compress(Marshal.dump(value)), options.merge(:raw => true))
end
end
end
end
|