Sha256: e6977b3a828011554941bd4af14e576590582236b6e4212c34c95c89a0222444

Contents?: true

Size: 663 Bytes

Versions: 5

Compression:

Stored size: 663 Bytes

Contents

class APICache
  class AbstractStore
    def initialize
      raise "Method not implemented. Called abstract class."
    end

    # Set value. Returns true if success.
    def set(key, value)
      raise "Method not implemented. Called abstract class."
    end

    # Get value.
    def get(key)
      raise "Method not implemented. Called abstract class."
    end

    # Does a given key exist in the cache?
    def exists?(key)
      raise "Method not implemented. Called abstract class."
    end

    # Has a given time passed since the key was set?
    def expired?(key, timeout)
      raise "Method not implemented. Called abstract class."
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mloughran-api_cache-0.2.0 lib/api_cache/abstract_store.rb
api_cache-0.2.3 lib/api_cache/abstract_store.rb
api_cache-0.2.2 lib/api_cache/abstract_store.rb
api_cache-0.2.1 lib/api_cache/abstract_store.rb
api_cache-0.2.0 lib/api_cache/abstract_store.rb