# File lib/puppet/util/settings.rb, line 674
674:   def value(param, environment = nil)
675:     param = param.to_sym
676:     environment &&= environment.to_sym
677: 
678:     # Short circuit to nil for undefined parameters.
679:     return nil unless @config.include?(param)
680: 
681:     # Yay, recursion.
682:     #self.reparse unless [:config, :filetimeout].include?(param)
683: 
684:     # Check the cache first.  It needs to be a per-environment
685:     # cache so that we don't spread values from one env
686:     # to another.
687:     if cached = @cache[environment||"none"][param]
688:       return cached
689:     end
690: 
691:     val = uninterpolated_value(param, environment)
692: 
693:     if param == :code
694:       # if we interpolate code, all hell breaks loose.
695:       return val
696:     end
697: 
698:     # Convert it if necessary
699:     val = convert(val, environment)
700: 
701:     # And cache it
702:     @cache[environment||"none"][param] = val
703:     val
704:   end