Sha256: e599ea70da16db4fc1fd1a2e230e91680624d6de62cbad1f7b8b367a8316f926
Contents?: true
Size: 402 Bytes
Versions: 1
Compression:
Stored size: 402 Bytes
Contents
module Wasserstand class HeapCache def initialize @backend = {} end def get(name) result = @backend[name] Wasserstand.logger.debug "#{self.class.name} GET #{result ? 'HIT' : 'MISS'} #{name}" result end def set(name, value) Wasserstand.logger.debug "#{self.class.name} SET #{name} => #{value.inspect}" @backend[name] = value end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wasserstand-0.0.10 | lib/wasserstand/heap_cache.rb |