/
RedisSharedCacheOptions.cs
78 lines (65 loc) · 2.03 KB
/
RedisSharedCacheOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
namespace InfinniPlatform.Cache
{
/// <summary>
/// Redis shared cache configuration options.
/// </summary>
public class RedisSharedCacheOptions : IOptions
{
/// <inheritdoc />
public string SectionName => "redisSharedCache";
/// <summary>
/// Default instance of <see cref="RedisSharedCacheOptions" />.
/// </summary>
public static readonly RedisSharedCacheOptions Default = new RedisSharedCacheOptions();
/// <summary>
/// Initializes a new instance of <see cref="RedisSharedCacheOptions" />.
/// </summary>
public RedisSharedCacheOptions()
{
Host = "localhost";
Port = 6379;
Database = 0;
ReadBufferSize = 512;
WriteBufferSize = 512;
ConnectionTimeout = 1000;
MaxReconnectRetries = 10;
PoolSize = 0;
}
/// <summary>
/// Redis server address.
/// </summary>
public string Host { get; set; }
/// <summary>
/// redis server port.
/// </summary>
public int Port { get; set; }
/// <summary>
/// Database number.
/// </summary>
public int Database { get; set; }
/// <summary>
/// Password.
/// </summary>
public string Password { get; set; }
/// <summary>
/// Read buffer size in bytes.
/// </summary>
public int ReadBufferSize { get; set; }
/// <summary>
/// Write buffer size in bytes.
/// </summary>
public int WriteBufferSize { get; set; }
/// <summary>
/// Connection timeout in milliseconds.
/// </summary>
public int ConnectionTimeout { get; set; }
/// <summary>
/// Maximum number of Reconnect retries.
/// </summary>
public int MaxReconnectRetries { get; set; }
/// <summary>
/// Connection pool size.
/// </summary>
public int PoolSize { get; set; }
}
}