class ROM::Cache::Namespaced
@api private
Attributes
cache[R]
@api private
namespace[R]
@api private
Public Class Methods
new(cache, namespace)
click to toggle source
@api private
# File lib/rom/cache.rb, line 21 def initialize(cache, namespace) @cache = cache @namespace = namespace.to_sym end
Public Instance Methods
[](key)
click to toggle source
@api private
# File lib/rom/cache.rb, line 27 def [](key) cache[[namespace, key].hash] end
fetch_or_store(*args, &block)
click to toggle source
@api private
# File lib/rom/cache.rb, line 32 def fetch_or_store(*args, &block) cache.fetch_or_store([namespace, args.hash].hash, &block) end
inspect()
click to toggle source
@api private
# File lib/rom/cache.rb, line 42 def inspect %(#<#{self.class} size=#{size}>) end
size()
click to toggle source
@api private
# File lib/rom/cache.rb, line 37 def size cache.size end