DevForce Help Reference
SaveCacheState(String,Boolean) Method


Name of file to use. Will be overwritten if it exists.
True to save the file in binary format; false to use text format.
Stores the state of this EntityManager and cached entities to a stream or file. Stores the state of this EntityManager and all cached entities to a file system file.
Syntax
'Declaration
 
Public Overloads Sub SaveCacheState( _
   ByVal fileName As String, _
   Optional ByVal useBinaryFormat As Boolean _
) 
'Usage
 
Dim instance As CacheStateManager
Dim fileName As String
Dim useBinaryFormat As Boolean
 
instance.SaveCacheState(fileName, useBinaryFormat)
public void SaveCacheState( 
   string fileName,
   bool useBinaryFormat
)

Parameters

fileName
Name of file to use. Will be overwritten if it exists.
useBinaryFormat
True to save the file in binary format; false to use text format.
Exceptions
ExceptionDescription
System.UnauthorizedAccessExceptionThe exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
System.Security.SecurityExceptionThe exception that is thrown when a security error is detected.
System.IO.IOExceptionThe exception that is thrown when an I/O error occurs.
Remarks
All entities in the EntityManager cache will be saved to the file specified. The file will contain the cache and current state in either binary or text format. The user must have write permissions to the folder, and if the file exists it will be overwritten.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CacheStateManager Class
CacheStateManager Members
Overload List
EntityCacheState Class
RestoreCacheState(String,Boolean) Method

Send Feedback