←Select platform

SaveToCache Method

Summary

Saves the document to the cache.

Syntax

C#
VB
Java
C++
public void SaveToCache() 
Public Sub SaveToCache() 
public:  
   void SaveToCache() 
public void saveToCache() 

Remarks

Documents can contain large number of pages and huge amount of data. Storing all this data in the physical memory is not feasible in most situations. Therefore, the Document class was designed to use an external caching system to store the modified. Refer to DocumentFactory.Cache for more information.

HasCache determines if this document is using the cache system. SaveToCache can be used to save a document to the cache and re-loading it using DocumentFactory.LoadFromCache.

Set AutoDeleteFromCache to true if your application uses cache to speed up processing the document and the object will not be used after it is disposed.

Set AutoDeleteFromCache to false if your application will save the document ID before disposing the document and use it to re-load the document using DocumentFactory.LoadFromCache.

To save the document to the cache, use SaveToCache or set the value of AutoSaveToCache to true before disposing the document.

The document is only saved into the cache if the value of CacheStatus is DocumentCacheStatus.NotSynced. When SaveToCache returns sucessfully, the value of CacheStatus of the document will be DocumentCacheStatus will contain the timestamp of the operation.

Refer to Document Toolkit and Caching for more information.

Example

For an example, refer to DocumentId.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Documents Assembly