wanshenmean
2026-03-26 8e42d0c1b7ae36cff2e7c69999117911a4b6f300
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
namespace WIDESEAWCS_RedisService.Storage
{
    public interface IObjectStorageService
    {
        /// <summary>
        /// 存储对象(Hash结构)
        /// </summary>
        bool SetObject<T>(string key, T value, TimeSpan? expiry = null) where T : class;
 
        /// <summary>
        /// 获取对象
        /// </summary>
        T? GetObject<T>(string key) where T : class;
 
        /// <summary>
        /// 设置对象的某个字段
        /// </summary>
        bool SetField(string key, string field, string value);
 
        /// <summary>
        /// 获取对象的某个字段
        /// </summary>
        string? GetField(string key, string field);
 
        /// <summary>
        /// 删除对象
        /// </summary>
        bool Delete(string key);
 
        /// <summary>
        /// 删除对象的某个字段
        /// </summary>
        bool DeleteField(string key, string field);
 
        /// <summary>
        /// 判断对象是否存在
        /// </summary>
        bool Exists(string key);
    }
}