ComponentOne DataObjects for .NET
CacheStorageEnum Enumeration

C1.Data.2 Assembly > C1.Data Namespace : CacheStorageEnum Enumeration
Specifies storage type for saving data.
Syntax
'Declaration
 
Public Enum CacheStorageEnum 
   Inherits System.Enum
public enum CacheStorageEnum : System.Enum 
Members
MemberDescription
FileCached data stored in files on the server.
MemoryCached data stored in server memory. In InProc session state mode, it is always physical memory. In SqlServer session state mode, the actual storage can be a database where the memory-based data is persisted. In StateServer session state mode, it is still server memory, but data ends up on a different server, the state server.
Remarks
For Memory storage type, storing data in the cache depends on the session state mode for which your web application is configured.

If SessionStateMode = InProc, in global cache, the data is copied to a persistent object in memory.

If SessionStateMode = InProc, in session cache, the data stays in the same object, no copying is necessary.

If SessionStateMode = SqlServer, the data is copied to a persistent object in memory and then the object is persisted, saved in the state database.

If SessionStateMode = StateServer, the data is copied to a persistent object in memory and then the object is remoted to the state server, where it stays in memory.

The fastest caching mode is using Memory storage type in session cache when your application is configured for SessionStateMode = InProc. In this case, saving and restoring data in cache is virtually immediate, because it does not involve copying any data, even in memory, it just stores a reference to an internal object. If you use SessionStateMode = StateServer or SqlServer with Memory storage type, C1WebDataObjects copies data in memory to make them persistent. This is also fast, but not immediate, depends on data size.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         C1.Data.CacheStorageEnum

See Also

Reference

C1.Data Namespace
CacheProperties Class