Sha256: dfedae6ac0dd101f0856ff52056f9981e29dff9a7d8e021551f7d7e8a721edc3

Contents?: true

Size: 574 Bytes

Versions: 171

Compression:

Stored size: 574 Bytes

Contents

module ActiveSupport
  module Cache
    class CompressedMemCacheStore < MemCacheStore
      def read(name, options = nil)
        if value = super(name, (options || {}).merge(:raw => true))
          if raw?(options)
            value
          else
            Marshal.load(ActiveSupport::Gzip.decompress(value))
          end
        end
      end

      def write(name, value, options = nil)
        value = ActiveSupport::Gzip.compress(Marshal.dump(value)) unless raw?(options)
        super(name, value, (options || {}).merge(:raw => true))
      end
    end
  end
end

Version data entries

171 entries across 138 versions & 22 rubygems

Version Path
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.31 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb