Method GetCache
GetCache(String, ConnectionOptions)
Gets an instance of ICache for the specified cache.
Declaration
public static ICache GetCache(string cacheName, ConnectionOptions connectionOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | cacheName | The name of the cache to connect to. |
| ConnectionOptions | connectionOptions | The |
Returns
| Type | Description |
|---|---|
| ICache | An instance of ICache. |
Remarks
The cache server endpoints are obtained from connectionOptions
or, if not specified, from the ncache section of the application's
configuration file (appsettings.json, app.config, or web.config).
Client cache settings are managed by the cache server and automatically applied
when the application connects to the cache.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when |