Sha256: 9022e2bcbcfa97c8daf7bb0377aae7d701500a8d856970ce3d8e4744c65fa5b4

Contents?: true

Size: 841 Bytes

Versions: 14

Compression:

Stored size: 841 Bytes

Contents

require 'protocol'

# The protocol the cache object has to conform to. This is a minimal subset of
# the ActiveSupport::Cache::Store protocol.
Mize::CacheProtocol = Protocol do
  # Clear the entire cache.
  def clear(options = nil)
  end

  # Returns true if the cache contains an entry for the given key.
  def exist?(name, options = nil)
  end

  # Fetches data from the cache, using the given key. If there is data in the
  # cache with the given key, then that data is returned. Otherwise, nil is
  # returned.
  def read(name, options = nil)
  end

  # Writes the value to the cache, with the key.
  def write(name, value, options = nil)
  end

  # Iterate over all cache entries and yield to their names.
  def each_name(&block)
  end

  # Return another cache instance that was correctly configured.
  def prototype
    dup
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mize-0.4.1 lib/mize/cache_protocol.rb
mize-0.4.0 lib/mize/cache_protocol.rb
mize-0.3.5 lib/mize/cache_protocol.rb
mize-0.3.4 lib/mize/cache_protocol.rb
mize-0.3.3 lib/mize/cache_protocol.rb
mize-0.3.2 lib/mize/cache_protocol.rb
mize-0.3.1 lib/mize/cache_protocol.rb
mize-0.3.0 lib/mize/cache_protocol.rb
mize-0.2.1 lib/mize/cache_protocol.rb
mize-0.2.0 lib/mize/cache_protocol.rb
mize-0.1.0 lib/mize/cache_protocol.rb
mize-0.0.2 lib/mize/cache_protocol.rb
mize-0.0.1 lib/mize/cache_protocol.rb
mize-0.0.0 lib/mize/cache_protocol.rb