# File utils.rb, line 62
    def cacheloader 
      if (name=params[:name]).nil?
        # Can't do anything, just return empty content so we don't get 'no
        # template' error.
        render :text => ''
        return
      end

      # Default cache configuration file
      cache_hints = File::join RAILS_ROOT, 'public/cachehints.txt' 

      # Add cache header
      headers.delete("Cache-Control")  
      if File.file?(cache_hints)
        file = File.new(cache_hints,"r")
        hintsTxt = file.read(File.size(cache_hints))
        file.close()
        hintsTxt.each_line do |line|
          if line.index(name) == 0
            line.scan(/(.*):(.*)/) do |garbage, ccheader|
              headers["Cache-Control"] = ccheader.strip
            end
            break
          end
        end
      end

      if name=~ /.png$/
        # for now hardcode the image directory
        filePath = File::join RAILS_ROOT, 'public/images/', name 
        file = File.new(filePath,"r")
        filecontents = file.read(File.size(filePath))
        file.close()

        headers["Content-Type"] = "image/png"

        render :text => filecontents
        return
      elsif name =~ /.xfs$/ or name =~ /.rxf/ 
        headers["Content-Type"] = "application/mform" 
      else 
        headers["Content-Type"] = "application/xml"
      end 

      render :template => name   
    end