module ROM::Cache
Public Class Methods
extended(klass)
click to toggle source
Calls superclass method
# File lib/rom/support/cache.rb, line 5 def self.extended(klass) super klass.include(Methods) klass.instance_variable_set(:@__cache__, Concurrent::Map.new) end
Public Instance Methods
cache()
click to toggle source
# File lib/rom/support/cache.rb, line 11 def cache @__cache__ end
fetch_or_store(*args, &block)
click to toggle source
# File lib/rom/support/cache.rb, line 15 def fetch_or_store(*args, &block) cache.fetch_or_store(args.hash, &block) end