$LOAD_PATH.unshift("#{File.dirname(__FILE__)}") module EnrichmentDb::Cache def self.get(query, values = nil) query_cache(query, values) end def self.set(query, values = nil, result = nil) query_cache(query, values, result) end def self.query_cache(query, values, result = nil) key = query + values.to_s @query_cache ||= {} @query_cache[key] ||= result end end