Class CacheStats
In: lib/storage/cache.rb
Parent: Object
CacheStats
CacheManager
CacheEntry
dot/f_42.png

This class stores the cache statistics.

Methods

each   inc   new  

Public Class methods

[Source]

# File lib/storage/cache.rb, line 38
  def initialize
    @stats = {}
  end

Public Instance methods

[Source]

# File lib/storage/cache.rb, line 47
  def each(&blk)
    @stats.each &blk
  end

[Source]

# File lib/storage/cache.rb, line 42
  def inc(k)
    @stats[k] ||= 0
    @stats[k] += 1
  end

[Validate]