Sha256: 02addb765fb6d1deb0bb63dc4e1d36d1f6bb48cc3271a9f7075b49827db7861b
Contents?: true
Size: 708 Bytes
Versions: 16
Compression:
Stored size: 708 Bytes
Contents
module Arrest class RequestContext attr_accessor :header_decorator ## # override with actual cache if desired def cache @cache ||= DummyCache.new end end class IdentityCache def initialize() @map = {} end def lookup(id, &blk) hit = @map[id] unless hit hit = @map[id] = yield end hit.clone end def update(id, object) @map[id] = object end def remove(id) @map.delete(id) end def flush() @map.clear end end class DummyCache def lookup(id, &blk) yield end def update(id, object) end def remove(id) end def flush() end end end
Version data entries
16 entries across 16 versions & 1 rubygems