At the server DocumentManager object level, DevExpress office controls provide the capability to automatically free the server operative memory (RAM) by hibernating inactive open documents. By default, document hibernation is disabled.
If you enable document hibernation, open documents that were idling for a certain time will be released from server memory and saved to the server file system at a specific path. This reduces server memory consumption and prevents the loss of unsaved document changes even if planed IIS process recycling occurs.
The following hibernation settings are available through the API exposed by the DocumentManager object.
Specifies the idle timeout for documents. The default value is TimeSpan.FromHours(1).
After this timeout has ended, if an end-user starts interacting with a hibernated document, the document is restored from the file back to the server's RAM. Note that the Undo/Redo history is the only data that is lost after a Spreadsheet timeout (a RichEdit document’s Undo/Redo history is stored on the client-side).
Specifies whether or not all open documents should be hibernated.
It is recommended that you define hibernation in the Application_Start handler in Global.asax. In this case, even after a server fails, you are not required to reload the page with the RichEdit or Spreadsheet control in the browser - end-users can continue to work with an open spreadsheet document. Each subsequent request will raise the Application_Start handler and define hibernation settings.
The following code example demonstrates how hibernation settings can be defined in the Application_Start method. Some of the settings are optional.