Class NCacheSessionExtensions
This class contains the Extension methods for ISession.
Inheritance
Inherited Members
Assembly: Alachisoft.NCache.DistributedCache.dll
Syntax
public static class NCacheSessionExtensions
Methods
AddNCacheDistributedCache(IServiceCollection, IConfiguration)
Adds the NCache cache whose name is specified in the configuration as the standard distributed cache to be used by sessions.
Declaration
public static IServiceCollection AddNCacheDistributedCache(this IServiceCollection services, IConfiguration configSection)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | Specifies the contract for a collection of service descriptors. |
IConfiguration | configSection | The virtual path to the Json configuration file. |
Returns
Type | Description |
---|---|
IServiceCollection | The service collection container. |
AddNCacheDistributedCache(IServiceCollection, Action<NCacheConfiguration>)
Adds the NCache cache whose name is specified in the configuration as the standard distributed cache to be used by sessions.
Declaration
public static IServiceCollection AddNCacheDistributedCache(this IServiceCollection services, Action<NCacheConfiguration> configure)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | Specifies the contract for a collection of service descriptors. |
System.Action<NCacheConfiguration> | configure | Action to configure NCacheConfiguration. |
Returns
Type | Description |
---|---|
IServiceCollection | The service collection container. |
AddNCacheDistributedCacheProvider(IServiceCollection, IConfiguration)
Adds the NCache Provider to support multiple caches whose names is specified in the configuration as the standard distributed cache to be used by sessions.
Declaration
public static IServiceCollection AddNCacheDistributedCacheProvider(this IServiceCollection services, IConfiguration configSection)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | Specifies the contract for a collection of service descriptors. |
IConfiguration | configSection | The virtual path to the Json configuration file. |
Returns
Type | Description |
---|---|
IServiceCollection | The service collection container. |
AddNCacheDistributedCacheProvider(IServiceCollection, Action<NCacheProviderConfiguration>)
Adds the NCache Provider to support multiple caches whose names is specified in the configuration as the standard distributed cache to be used by sessions.
Declaration
public static IServiceCollection AddNCacheDistributedCacheProvider(this IServiceCollection services, Action<NCacheProviderConfiguration> configure)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | Specifies the contract for a collection of service descriptors. |
System.Action<Alachisoft.NCache.Caching.Distributed.Configuration.NCacheProviderConfiguration> | configure | Action to configure NCacheProviderConfiguration. |
Returns
Type | Description |
---|---|
IServiceCollection | The service collection container. |