   # Public: Get the entire text of the buffer.
   #
   # Returns a {String}.
-  getText: -> @buffer.getText()
+  getText: -> @cachedText ?= @buffer.getText()
 
   # Public: Get the text in a range.
   #

  fileSubscriptions: null
  backwardsScanChunkSize: 8000
  defaultMaxUndoEntries: 10000
  changeCount: 0
  nextMarkerLayerId: 0

  ###

      buffer.nextMarkerLayerId = params.nextMarkerLayerId
      buffer.nextDisplayLayerId = params.nextDisplayLayerId

      if buffer.digestWhenLastPersisted is params.digestWhenLastPersisted or not params.filePath?
        buffer.buffer.deserializeChanges(params.outstandingChanges)
        buffer.history.deserialize(params.history, buffer)

      for layerId, layerState of params.markerLayers
        if layerId is params.defaultMarkerLayerId
