Sha256: 3642e492e7e1782cfd9462721fe45821ad10fa02eb314a4130aa2ec5212db592

Contents?: true

Size: 810 Bytes

Versions: 15

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

module Delorean
  module Cache
    module Adapters
      class Base
        def cache_item(klass:, cache_key:, args:)
          raise 'cache_item is not implemented'
        end

        def fetch_item(klass:, cache_key:, args:)
          raise 'fetch_item is not implemented'
        end

        def cache_key(klass:, method_name:, args:)
          raise 'cache_key is not implemented'
        end

        def clear!(klass:)
          raise 'clear! is not implemented'
        end

        def clear_all!
          raise 'clear_all! is not implemented'
        end

        # Redefine this method in descendants
        # to avoid caching calls with certain arguments
        def cache_item?(klass:, method_name:, args:)
          true
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
delorean_lang-2.5.0 lib/delorean/cache/adapters/base.rb
delorean_lang-2.4.2 lib/delorean/cache/adapters/base.rb
delorean_lang-2.4.0 lib/delorean/cache/adapters/base.rb
delorean_lang-2.3.0 lib/delorean/cache/adapters/base.rb
delorean_lang-2.1.0 lib/delorean/cache/adapters/base.rb
delorean_lang-2.0.0 lib/delorean/cache/adapters/base.rb
delorean_lang-1.1.0 lib/delorean/cache/adapters/base.rb
delorean_lang-1.0.0 lib/delorean/cache/adapters/base.rb
delorean_lang-0.6.3 lib/delorean/cache/adapters/base.rb
delorean_lang-0.6.2 lib/delorean/cache/adapters/base.rb
delorean_lang-0.6.1 lib/delorean/cache/adapters/base.rb
delorean_lang-0.6.0 lib/delorean/cache/adapters/base.rb
delorean_lang-0.5.4 lib/delorean/cache/adapters/base.rb
delorean_lang-0.5.3 lib/delorean/cache/adapters/base.rb
delorean_lang-0.5.2 lib/delorean/cache/adapters/base.rb