Error processing SSI file
LEADTOOLS Caching (Leadtools.Caching assembly)

Show in webframe

CacheSerializationMode Enumeration






Cache serialization mode
Syntax
[DataContractAttribute()]
public enum CacheSerializationMode : System.Enum 
'Declaration
 
<DataContractAttribute()>
Public Enum CacheSerializationMode 
   Inherits System.Enum
'Usage
 
Dim instance As CacheSerializationMode
public enum CacheSerializationMode
            
[DataContractAttribute()]
public enum class CacheSerializationMode : public System.Enum 
Members
ValueMemberDescription
0Binary Binary serialization using the native framework serialization capability. This mode is the fastest but is not backward compatible between different versions of LEADTOOLS. This mode will create a cache that cannot be shared between the .NET and Java version of Leadtools.Caching.
1Xml XML serialization. This mode is backward compatible between different versions of LEADTOOLS. This mode will create a cache that can be shared between the .NET and Java version of Leadtools.Caching.
2Json Json serialization. This mode is backward compatible between different versions of LEADTOOLS. This mode will create a cache that can be shared between the .NET and Java version of Leadtools.Caching. Recommended.
Remarks

CacheSerializationMode is used as the type for the following members:

Member Description
ObjectCache.PolicySerializationMode

Determines the type of serialization to use when the policy is saved into the cache.

ObjectCache.DataSerializationMode

Determines the type of serialization to use when the data is saved into the cache.

The LEADTOOLS Document Viewer and Converter framework uses the recommended CacheSerializationMode.Json mode that offers backward compatibility as well as sharing a cache between the .NET and Java version of the framework.

When Binary is used, the cache will use the default framework binary serializer to save and load the policy file or data items. For instance, by using the System.Runtime.Serialization.Formatters.Binary.BinaryFormatter in the .NET framework. The cache will contain an [item].data and [item].policy files containing a binary stream of the item value binary data and its policy.

When Xml is used, the cache will create an XML serializer to save and load the policy file or data items. For instance, by using the System.Runtime.Serialization.DataContractSerializer in the .NET framework. The cache will contain an [item].data and [item].policy.xml files containing the xml representation of the item value type and its policy. When using this mode, it is your responsibility to ensure that the complex item values contain types that contains the .NET DataContract / DataMember attributes. This mode is not supported by the Java framework.

When Json is used, the cache will create a JSON serializer to save and load the policy file or data items. For instance, by using the System.Runtime.Serialization.Json.DataContractJsonSerializer in the .NET framework. The cache will contain an [item].data and [item].policy.json files containing the xml representation of the item value type and its policy. When using this mode, it is your responsibility to ensure that the complex item values contain types that contains the .NET DataContract / DataMember attributes. This mode is not supported by the Java framework (using the gson library).

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Caching.CacheSerializationMode

Requirements

Target Platforms

See Also

Reference

Leadtools.Caching Namespace

Error processing SSI file
Leadtools.Caching requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features