Specifies storage type for saving data.

Namespace:  C1.Data
Assembly:  C1.Data.2 (in C1.Data.2.dll)

Syntax

C#
public enum CacheStorageEnum
Visual Basic (Declaration)
Public Enumeration CacheStorageEnum

Members

Member nameDescription
File
Memory

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.

See Also