Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Used for configuring a cache client programmatically, based on the parameter values provided.
Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)
Syntax
'Declaration
Public Sub New ( _
servers As ServerEndPoint(), _
routingClient As Boolean, _
localCache As Boolean _
)
'Usage
Dim servers As ServerEndPoint()
Dim routingClient As Boolean
Dim localCache As Boolean
Dim instance As New CacheFactory(servers, routingClient, localCache)
public CacheFactory (
ServerEndPoint[] servers,
bool routingClient,
bool localCache
)
public:
CacheFactory (
array<ServerEndPoint^>^ servers,
bool routingClient,
bool localCache
)
public CacheFactory (
ServerEndPoint[] servers,
boolean routingClient,
boolean localCache
)
public function CacheFactory (
servers : ServerEndPoint[],
routingClient : boolean,
localCache : boolean
)
Parameters
- servers
The cache host configuration for the cache client, for an array of ServerEndPoint objects.
- routingClient
True when the GetCache method returns routing clients; otherwise, it returns simple clients.
- localCache
True when local cache is enabled on the cache client; otherwise, local cache is disabled.
Remarks
Before working with the cache, you must instantiate the CacheFactory class. When configuration parameters are passed to the CacheFactory class constructor, those configuration settings are used for all cache clients obtained from that CacheFactory object. Configuration parameters passed to the constructor override settings specified in the application configuration file. For more information about configuration options and settings for the cache client, see Configuration (Velocity).
For the servers parameter, make sure to specify those cache hosts that have been designated lead hosts. Lead hosts are typically the first cache servers installed in the cluster. For more information about lead hosts, see the Physical Model section in General Concepts (Velocity). You can determine which hosts are lead hosts by using the PowerShell administration tool. For more information about PowerShell, see Cache Administration with PowerShell (Velocity).
For more information about simple clients, routing clients, and local cache, see Cache Clients and Local Cache (Velocity).
See Also
Reference
CacheFactory Class
CacheFactory Members
System.Data.Caching Namespace