def #{m} *params Cache.monitor.synchronize do @cache_versions_#{als} ||= {#{vnames_str}} @cache_value_#{als} ||= {} if @cache_versions_#{als}.all?{|vname, v| v == RubyExt::Cache.version(vname)} and @cache_value_#{als}.include?(params) return @cache_value_#{als}[params] else @cache_versions_#{als}.keys.each{|vname| @cache_versions_#{als}[vname] = RubyExt::Cache.version(vname)} return @cache_value_#{als}[params] = cached_#{als}(*params) end end end