Class RedisConfigurations
Manages redis client configurations for the cache handle.
Configurations will be added by the cache configuration builder/factory or the configuration loader. The cache handle will pick up the configuration matching the handle's name.
Inherited Members
Namespace:CacheManager.Redis
Assembly:CacheManager.StackExchange.Redis.dll
Syntax
public static class RedisConfigurations
Methods
| Improve this Doc View SourceAddConfiguration(RedisConfiguration)
Adds the configuration.
Declaration
public static void AddConfiguration(RedisConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
RedisConfiguration | configuration | The configuration. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If configuration is null. |
GetConfiguration(String)
Gets the configuration.
Declaration
public static RedisConfiguration GetConfiguration(string configurationName)
Parameters
Type | Name | Description |
---|---|---|
String | configurationName | The identifier. |
Returns
Type | Description |
---|---|
RedisConfiguration | The |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If id is null. |
InvalidOperationException | If no configuration was added for the id. |
LoadConfiguration()
Loads the configuration from the default section name 'cacheManager.Redis'.
Declaration
public static void LoadConfiguration()
LoadConfiguration(RedisConfigurationSection)
Loads the configuration.
Declaration
public static void LoadConfiguration(RedisConfigurationSection section)
Parameters
Type | Name | Description |
---|---|---|
RedisConfigurationSection | section | The section. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If section is null. |
LoadConfiguration(String)
Loads the configuration.
Declaration
public static void LoadConfiguration(string sectionName)
Parameters
Type | Name | Description |
---|---|---|
String | sectionName | Name of the section. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If sectionName is null. |
LoadConfiguration(String, String)
Loads the configuration.
Declaration
public static void LoadConfiguration(string configFileName, string sectionName)
Parameters
Type | Name | Description |
---|---|---|
String | configFileName | Name of the configuration file. |
String | sectionName | Name of the section. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If configFileName or sectionName are null. |
InvalidOperationException | If the configuration file could not be found. |