class XRBP::SHAMap::TaggedCache

Internal node caching mechanism.

TODO timeout mechanism, metrics

Public Class Methods

new() click to toggle source
# File lib/xrbp/nodestore/shamap/tagged_cache.rb, line 7
def initialize
  @cache = {}
end

Public Instance Methods

canonicalize(key, node) click to toggle source
# File lib/xrbp/nodestore/shamap/tagged_cache.rb, line 15
def canonicalize(key, node)
  @cache[key] = node
end
fetch(key) click to toggle source
# File lib/xrbp/nodestore/shamap/tagged_cache.rb, line 11
def fetch(key)
  @cache[key]
end