module Cache
  attr_accessor :cache
  attr_accessor :length
  
  class BaseCache
    def initialize(size)
      @size = size
      @cache = {}
    end

    def [](key)
    end

    def []=(key, value)
    end

    def delete(key)
    end

    def keys
      @cache.keys
    end

    def values
      @cache.values
    end

    def length
      @cache.length
    end

    def reset
      @cache = {}
      @size = 0
    end
  end
end
module Cache
  attr_accessor :cache
  attr_accessor :length
  
  class BaseCache
    def initialize(size)
      @size = size
      @cache = {}
    end
    
    def keys
      @cache.keys
    end

    def values
      @cache.values
    end

    def length
      @cache.length
    end

    protected

    def [](key)
    end

    def []=(key, value)
    end

    def delete(key)
    end

    def reset
      @cache = {}
      @size = 0
    end
  end
end
Make interface a bit more restricted
Make interface a bit more restricted
