Class CacheInitParams
Instance of this class can be used to define the parameters at the time of cache initialization.
Inheritance
Namespace:
Assembly: Alachisoft.NCache.Web.dll
Syntax
public class CacheInitParams : ICloneable
Examples
You can create an instance of CacheInitParams class and use it while initialization of cache."/>
CacheInitParams cacheParam = new CacheInitParams();
SecurityParams userCredentials = new SecurityParams(UserId, Password);
cacheParam.PrimaryUserCredentials = userCredentials;
Cache cache = Web.Caching.NCache.InitializeCache(Name, cacheParam);
Name | Description |
---|---|
AppName | If different client applications are connected to server and because of any issue which results in connection failure with server, after the client again establishes connection “AppName” is used to identify these different client applications. Data type is string. Its optional.If value is not set it takes the value of the process id. |
BindIP | Gets/Sets the IP for the client to be binded with |
ClientCacheSyncMode | Gets/Sets Enumeration to specify how the Client cache is synchronized with the cluster caches through events. |
ClientRequestTimeOut | Clients operation timeout specified in seconds. Clients wait for the response from the server for this time. If the response is not received within this time, the operation is not successful. Based on the network conditions, OperationTimeout value can be adjusted. The default value is 90 seconds. |
CommandRetries | If client application sends request to server for any operation and a response is not received, then the number of retries it will make until it gets response is defined here. |
CommandRetryInterval | In case if client app doesn’t get response against some operation call on server, the command retry interval defines the waiting period before the next attempt to send the operation the server is made. Type integer which defines seconds. |
ConnectionRetries | Number of tries to re-establish a broken connection between client and server. |
ConnectionTimeout | Client's connection timeout specified in seconds. |
DefaultReadThruProvider | Gets/Sets ID of DefaultReadThruProvider |
DefaultWriteThruProvider | Gets/Sets ID of DefaultWriteThruProvider |
EnableClientLogs | Enables client logs. |
EnableKeepAlive | Sets the keep alive flag |
KeepAliveInterval | Gets or Sets the KeepAliveInterval, which will be in effect if the EnabledKeepAlive is set 'true' or is specified 'true' from the client configuration. Note: If the value to be set is lesser than 1 or is greater than 7200 (2 hours in seconds), it will resort back 30 seconds internally. |
LoadBalance | When this flag is set, client tries to connect to the optimum server in terms of number of connected clients. This way almost equal number of clients are connected to every node in the clustered cache and no single node is overburdened. |
LogLevel | Sets the log level either as Info, Error or Debug |
Mode | Gets/Sets the cache mode (inproc/outproc) |
Port | Gets/Sets the port on which the clients will connect to a server. |
PrimaryUserCredentials | Gets/Sets the user-id and password for the primary cache user. This information is required when the security is enabled. If primary user's authentication fails, SecondaryUserCredentials are tried. |
RetryConnectionDelay | The time after which client will try to reconnect to the server. |
RetryInterval | Time in seconds to wait between two connection retries. |
SecondaryUserCredentials | Gets/Sets the user-id and password for the secondary cache user. This information is required when the security is enabled. |
Server | Gets/Sets the server clients will connect to. |
ServerList | Gets/Sets List of servers provided by the user |
Name | Description |
---|---|
Clone() | Creates Clone for deep copy of the initParam |