#:enddoc: module RailsConnector class Cache @cache = {} @context = false def self.begin_context @context = true end def self.end_context @context = false reset end def self.in_context? @context end def self.load(key) @cache[key] end def self.store(key, value) @cache[key] = value if @context end def self.reset @cache.clear end end end # module RailsConnector