class CacheStats

This class stores the cache statistics.

Public Class Methods

new() click to toggle source
# File lib/storage/cache.rb, line 38
def initialize
  @stats = {}
end

Public Instance Methods

each(&blk) click to toggle source
# File lib/storage/cache.rb, line 47
def each(&blk)
  @stats.each &blk
end
inc(k) click to toggle source
# File lib/storage/cache.rb, line 42
def inc(k)
  @stats[k] ||= 0
  @stats[k] += 1
end