You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
910 B
40 lines
910 B
namespace Znyc.Admin.Commons.Cache
|
|
{
|
|
/// <summary>
|
|
/// 缓存提供模式,使用Redis或MemoryCache
|
|
/// </summary>
|
|
public class CacheProvider
|
|
{
|
|
private bool _isUseRedis;
|
|
|
|
private string _connectionString;
|
|
private string _instanceName;
|
|
|
|
/// <summary>
|
|
/// 是否使用Redis
|
|
/// </summary>
|
|
public bool IsUseRedis
|
|
{
|
|
get => _isUseRedis;
|
|
set => _isUseRedis = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Redis连接
|
|
/// </summary>
|
|
public string ConnectionString
|
|
{
|
|
get => _connectionString;
|
|
set => _connectionString = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Redis实例名称
|
|
/// </summary>
|
|
public string InstanceName
|
|
{
|
|
get => _instanceName;
|
|
set => _instanceName = value;
|
|
}
|
|
}
|
|
}
|