    # File lib/yard/server/commands/base.rb, line 160
            def cache(data)
              if caching && adapter.document_root
                path = File.join(adapter.document_root, request.path.sub(/\.html$/, '') + '.html')
                path = path.sub(%r{/\.html$}, '.html')
                FileUtils.mkdir_p(File.dirname(path))
                log.debug "Caching data to #{path}"
                File.open(path, 'wb') {|f| f.write(data) }
              end
              self.body = data
            end