Sha256: 8abe028ea0077b7e29a3de6e265688f120ad7474efccef345e190ef179bc394a

Contents?: true

Size: 396 Bytes

Versions: 9

Compression:

Stored size: 396 Bytes

Contents

module Catche
  module Adapter
    class Base

      class << self

        def read(key, default_value=nil)
          adapter.read(key) || default_value
        end

        def write(key, value)
          adapter.write(key, value)
        end

        def delete(key)
          adapter.delete(key)
        end

        def adapter
          Rails.cache
        end

      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
catche-0.2.5 lib/catche/adapter/base.rb
catche-0.2.4 lib/catche/adapter/base.rb
catche-0.2.3 lib/catche/adapter/base.rb
catche-0.2.2 lib/catche/adapter/base.rb
catche-0.2.1 lib/catche/adapter/base.rb
catche-0.2 lib/catche/adapter/base.rb
catche-0.1.2 lib/catche/adapter/base.rb
catche-0.1.1 lib/catche/adapter/base.rb
catche-0.1.0 lib/catche/adapter/base.rb